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

Deprecation notice removal for annotation usage #119

Conversation

Nek-
Copy link
Collaborator

@Nek- Nek- commented Jul 1, 2022

Checkout issue #113 . It's specific to annotation usage.

Before: using the validation constraint as annotation were leading to a
trigger of a deprecation notice concerning the "format" argument
(besides it was actually working properly)

After: no more deprecation notice, learn more on issue misd-service-development#113
@Nek- Nek- force-pushed the fix/issue-113-annotation-trigger-deprecation-notice branch from 7d71a13 to 9fb9904 Compare July 1, 2022 13:59
@maxhelias
Copy link
Collaborator

Should we add a doctrine/annotation conflicts <= 1.12 for NamedArgumentConstructor ?

@Nek-
Copy link
Collaborator Author

Nek- commented Jul 1, 2022

This is actually a good question I didn't test this with low dependencies. I'm going to try this. Anyway, If it doesn't work with doctrine/annotation <= 1.12 I'm more in favor of enforcing the dependency than adding it in the conflict section.

@Nek-
Copy link
Collaborator Author

Nek- commented Jul 1, 2022

So, to test with a low version of doctrine annotations here is the required composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": ">=7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "doctrine/annotations": "1.11.2",
        "doctrine/doctrine-bundle": "^2.2",
        "doctrine/doctrine-migrations-bundle": "^3.2",
        "doctrine/orm": "2.8.5",
        "odolbeau/phone-number-bundle": "^3.6",
        "sensio/framework-extra-bundle": "^6.2",
        "symfony/console": "4.4.*",
        "symfony/dotenv": "4.4.*",
        "symfony/flex": "^1.3.1",
        "symfony/form": "4.4.*",
        "symfony/framework-bundle": "4.4.*",
        "symfony/maker-bundle": "^1.39.0",
        "symfony/proxy-manager-bridge": "4.4.*",
        "symfony/security-csrf": "4.4.*",
        "symfony/validator": "4.4.*",
        "symfony/yaml": "4.4.*"
    },
    "config": {
        "allow-plugins": {
            "composer/package-versions-deprecated": true,
            "symfony/flex": true
        },
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.4.*"
        }
    },
    "require-dev": {
        "symfony/stopwatch": "4.4.*",
        "symfony/web-profiler-bundle": "4.4.*"
    }
}

It hurts. But works like a charm 😁 .

@maxhelias maxhelias merged commit dce640b into odolbeau:master Jul 2, 2022
@Nek- Nek- deleted the fix/issue-113-annotation-trigger-deprecation-notice branch July 2, 2022 21:47
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.

2 participants