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

Missing Phalcon40 changes #2408

Closed
ruudboon opened this issue Dec 7, 2019 · 0 comments · Fixed by #2437
Closed

Missing Phalcon40 changes #2408

ruudboon opened this issue Dec 7, 2019 · 0 comments · Fixed by #2437
Assignees

Comments

@ruudboon
Copy link
Contributor

ruudboon commented Dec 7, 2019

Did a small scan on the current Phalcon40 project. And noticed the following.
Not sure how to define this in the yaml and if it's even possible.

1. Flash ✔️

https://docs.phalcon.io/4.0/en/upgrade#flash
Constructor param should be set using setCssClasses

-$flash = new Phalcon\Flash([mixed $cssClasses])
+$flash = new Phalcon\Flash()
+$flash->setCssClasses($cssClasses)

2. Param order ✔️

https://docs.phalcon.io/4.0/en/upgrade#mvcmodel
Param order changed.

-Phalcon\Model::assign(array $data, mixed $dataColumnMap = null, array $whiteList = null)
+Phalcon\Model::assign(array $data, mixed $whiteList = null, mixed $dataColumnMap = nul)

What url should be handed is now the responsibility of the user.

3. Application Factory ✔️

Before

<?php
$application = new Phalcon\Mvc\Application($di);

try {
    $response = $application->handle();

    $response->send();
} catch (\Exception $e) {
    echo 'Exception: ', $e->getMessage();
}

Phalcon 4

<?phpx
$container   = new Phalcon\Di\FactoryDefault();
$application = new Phalcon\Mvc\Application($container);

try {
    $response = $application->handle(
        $_SERVER["REQUEST_URI"]
    );

    $response->send();
} catch (\Exception $e) {
    echo $e->getMessage();
}
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 a pull request may close this issue.

2 participants