Comments (4)
This is because it reads the schema for the table class, which stipulates that column type so the behaviour can process the file.
You'll need to manually change your fixture. There was some discussion about the root issue , but I can't find it now, the upshot was that the data type class should implement the base type of string.
Perhaps that needs to happen in the plugin? Either through class FileType extends StringType
from cakephp-upload.
Thank you, David. This makes sense, just wasn't sure if this was the expected behavior, or not. Closing ticket.
from cakephp-upload.
I found this issue happening when running filtered tests.
The solution we found is to load the plugin in the test class so that the application was bootstrapped as expected as described in https://book.cakephp.org/4/en/development/testing.html#integration-testing-psr-7-middleware
PS. The app is on CakePHP 4.2, PHP 8.1 and PHPUnit 9.5.
from cakephp-upload.
I got same error but i don't use fixtures but migrations to initialize test database.
Do you have solution to avoid this behavior ?
Thanks
Edit: i loaded plugin in my test case, but i always got the same error.
Edit2: Fixed, i had to load plugins before parent::setUp();
from cakephp-upload.
Related Issues (20)
- CakePHP 4 Upload Plugin
- set behaviors config in Method results in emtpy filename
- Cannot Find plugin and it is there HOT 1
- Save on _joinData HOT 2
- request to new tag on 3.x HOT 2
- Class 'League\Flysystem\Adapter\Local' not found HOT 2
- Saving model failed with no error HOT 1
- Duplicate configs on certain situations HOT 2
- Deprecated
- Solved: Using transformer does not upload video and entity isn't saved HOT 1
- File not uploading/object not removed from data HOT 2
- Unable to upload images to S3 HOT 1
- 700 permission in subfolder using 'path' HOT 1
- Support for chunking HOT 1
- cake-5 branch not installable HOT 5
- Translate Behavior : Cannot convert value of type Laminas\Diactoros\UploadedFile to string
- Help on object clone
- Validate upload mime type HOT 1
- filegrabber in cakephp 4 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-upload.