Skip to content

Conversation

@raul338
Copy link
Contributor

@raul338 raul338 commented Apr 16, 2018

Update code to remove deprecations.

Maybe I should drop PHP 5.5 ?

@josegonzalez
Copy link
Member

Dropping php5.5 seems reasonable.

@raul338 raul338 force-pushed the cakephp-deprecations branch from 6dece51 to 5e9d8cb Compare April 16, 2018 01:39
@raul338
Copy link
Contributor Author

raul338 commented Apr 16, 2018

This should be ready to merge

*/
public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options)
{
$validator = $this->_table->validator();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be getValidator

@raul338 raul338 force-pushed the cakephp-deprecations branch from cc8e9bf to ff684ab Compare April 22, 2018 19:40
@raul338
Copy link
Contributor Author

raul338 commented Apr 23, 2018

Done. What else should be done ?

@josegonzalez
Copy link
Member

Seems reasonable. Can you smoke-test this in an app and verify everything works as you expect?

@raul338 raul338 force-pushed the cakephp-deprecations branch from c145ba9 to 66b7630 Compare April 24, 2018 01:30
@raul338
Copy link
Contributor Author

raul338 commented Apr 24, 2018

As of now, Upload works. The code I used is based of the examples. KeepFilesOnDelete set false also works

$this->addBehavior('Josegonzalez/Upload.Upload', [
    'foto' => [
        'path' => 'webroot{DS}img{DS}uploads{DS}tickets{DS}{field-value:ticket_id}{DS}',
        'nameCallback' => function ($data, $settings) {
            return time() . '_' . $data['name'];
        },
    ],
]);
// ....
$validator->setProvider('upload', UploadValidation::class);
$validator->add('foto', 'fileFileUpload', [
    'rule' => 'isFileUpload',
    'message' => 'Debe cargar una foto',
    'provider' => 'upload',
    'on' => 'create',
]);

@bmeclazcke
Copy link

Hey all!

Any ETA on when is this going to be released?

Thanks!

@josegonzalez
Copy link
Member

Now seems fine.

@josegonzalez josegonzalez merged commit dd91ff8 into FriendsOfCake:master Apr 26, 2018
@josegonzalez
Copy link
Member

Released 4.0.0.

@raul338 raul338 deleted the cakephp-deprecations branch April 26, 2018 23:55
@Spriz
Copy link

Spriz commented Sep 18, 2018

FYI:

It says in the release that Cake 3.6 is required ("This change requires at least CakePHP 3.6, and should support the upcoming 4.x release.")

But it only seems to require Cake 3.4 in the composer.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants