Skip to content

Serializer fails because of old nilportugues/php-serializer dependency #33

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

Closed
chmielot opened this issue Mar 2, 2017 · 3 comments
Closed

Comments

@chmielot
Copy link

chmielot commented Mar 2, 2017

Hi,

while trying to serialize an object I ran into an issue that was fixed already here:
nilportugues/php-serializer@8489eab

This is because symfony-jsonapi relies on
"nilportugues/json-api": "^2.4"

which relies on
"nilportugues/api-transformer": "^3.0.0"

which relies on
"nilportugues/serializer": "~1.1"

I installed the package about 2 days ago. According to https://getcomposer.org/doc/articles/versions.md#tilde version 1.2 of serializer should have been installed, but it wasn't. Instead I have this in my composer.lock file (excerpt):
snip snip

{
            "name": "nilportugues/serializer",
            "version": "1.1.5",
            "source": {
                "type": "git",
                "url": "https://github.com/nilportugues/serializer.git",
                "reference": "82ede04c687336aaec5f1c58f3ec986626b05810"
            },
},
{
            "name": "nilportugues/api-transformer",
            "version": "3.0.0",
            "source": {
                "type": "git",
                "url": "https://github.com/nilportugues/php-api-transformer.git",
                "reference": "4e2743527b7deb7af5b4ef55f2ca33146e9fab65"
            },
},
{
            "name": "nilportugues/json-api",
            "version": "2.4.4",
            "source": {
                "type": "git",
                "url": "https://github.com/nilportugues/php-json-api.git",
                "reference": "87d5898dee49670df8c67c81014db3c31cf94202"
            },
},
{
            "name": "nilportugues/jsonapi-bundle",
            "version": "1.5.2",
            "source": {
                "type": "git",
                "url": "https://github.com/nilportugues/symfony-jsonapi.git",
                "reference": "c4bbdfec0bb0b402aa0057fd32d1225447988460"
            },
}

Any idea what's wrong with the dependencies?

@chmielot
Copy link
Author

chmielot commented Mar 3, 2017

I'm using your bundle together with Symfony 3. The problem was related to the platform requirements. I added the current serializer version explicitly to my composer.json and got the following error:

 Problem 1
    - Installation request for nilportugues/serializer ^1.2 -> satisfiable by nilportugues/serializer[1.2.0].
    - nilportugues/serializer 1.2.0 requires php >=5.6.0 -> your PHP version (7.1.1) overridden by "config.platform.php" version (5.5.9) does not satisfy that requirement.

In my particular use case it's ok to run composer with --ignore-platform-reqs, it works correctly then.

@chmielot chmielot closed this as completed Mar 3, 2017
@nilportugues
Copy link
Owner

I will dig into it, I don't want people using the --ignore-platform-reqs

@nilportugues nilportugues reopened this Mar 3, 2017
@nilportugues
Copy link
Owner

Fixed on the underlying library

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

No branches or pull requests

2 participants