Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for CakePHP 3.6 #485

Merged
merged 8 commits into from
Apr 26, 2018

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
Copy link
Contributor Author

raul338 commented Apr 16, 2018

This should be ready to merge

@@ -60,7 +60,7 @@ public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $opti
{
$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
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
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.

None yet

5 participants