trivago / jade

A simple but yet powerful library to expose your entities through JSON API.
Other
55 stars 6 forks source link

Add support for Symfony 4 #10

Open regniblod opened 6 years ago

regniblod commented 6 years ago

Hi there!

I tried to add support for Symfony 4 requiring "symfony/symfony": "^3.0 | ^4.0", but this doesn't work if the Symfony 4 project is using Symfony Flex since this one conflicts with "symfony/symfony": "*".

This is because in Symfony Flex you are not supposed to require the whole framework, but individual components.

Maybe the requirement on symfony/symfony can be changed in favor of symfony/framework-bundle? Would that be enough?

Thanks!

moein commented 6 years ago

symfony/symfony basically contains all the components and it's not only symfony/framework-bundle These are the components I could think of symfony/routing symfony/http-foundation symfony/dependency-injection symfony/config symfony/http-kernel symfony/framework-bundle (Not sure if bundles are needed when using flex)

regniblod commented 6 years ago

Ok, let's try to break this problem down.

A Symfony 3.4 application requires symfony/symfony v3.4 which replaces this packages (so, it provides them):

"replace": {
    "symfony/asset": "self.version",
    "symfony/browser-kit": "self.version",
    "symfony/cache": "self.version",
    "symfony/class-loader": "self.version",
    "symfony/config": "self.version",
    "symfony/console": "self.version",
    "symfony/css-selector": "self.version",
    "symfony/dependency-injection": "self.version",
    "symfony/debug": "self.version",
    "symfony/debug-bundle": "self.version",
    "symfony/doctrine-bridge": "self.version",
    "symfony/dom-crawler": "self.version",
    "symfony/dotenv": "self.version",
    "symfony/event-dispatcher": "self.version",
    "symfony/expression-language": "self.version",
    "symfony/filesystem": "self.version",
    "symfony/finder": "self.version",
    "symfony/form": "self.version",
    "symfony/framework-bundle": "self.version",
    "symfony/http-foundation": "self.version",
    "symfony/http-kernel": "self.version",
    "symfony/inflector": "self.version",
    "symfony/intl": "self.version",
    "symfony/ldap": "self.version",
    "symfony/lock": "self.version",
    "symfony/monolog-bridge": "self.version",
    "symfony/options-resolver": "self.version",
    "symfony/process": "self.version",
    "symfony/property-access": "self.version",
    "symfony/property-info": "self.version",
    "symfony/proxy-manager-bridge": "self.version",
    "symfony/routing": "self.version",
    "symfony/security": "self.version",
    "symfony/security-core": "self.version",
    "symfony/security-csrf": "self.version",
    "symfony/security-guard": "self.version",
    "symfony/security-http": "self.version",
    "symfony/security-bundle": "self.version",
    "symfony/serializer": "self.version",
    "symfony/stopwatch": "self.version",
    "symfony/templating": "self.version",
    "symfony/translation": "self.version",
    "symfony/twig-bridge": "self.version",
    "symfony/twig-bundle": "self.version",
    "symfony/validator": "self.version",
    "symfony/var-dumper": "self.version",
    "symfony/web-link": "self.version",
    "symfony/web-profiler-bundle": "self.version",
    "symfony/web-server-bundle": "self.version",
    "symfony/workflow": "self.version",
    "symfony/yaml": "self.version"
}

A Symfony 4 application can be created in two ways, a minimal version and a full-website version. The minimal version is symfony/skeleton v4.0 and requires this symfony packages:

"require": {
    "symfony/console": "^4.1",
    "symfony/flex": "^1.0",
    "symfony/force-lowest": "=4.1",
    "symfony/framework-bundle": "^4.1",
    "symfony/yaml": "^4.1"
}

The full-website version is symfony/website-skeleton v4.0 and requires this packages:

"require": {
    "sensio/framework-extra-bundle": "^5.1",
    "symfony/asset": "^4.1",
    "symfony/console": "^4.1",
    "symfony/expression-language": "^4.1",
    "symfony/flex": "^1.0",
    "symfony/force-lowest": "=4.1",
    "symfony/form": "^4.1",
    "symfony/framework-bundle": "^4.1",
    "symfony/monolog-bundle": "^3.1",
    "symfony/orm-pack": "*",
    "symfony/process": "^4.1",
    "symfony/security-bundle": "^4.1",
    "symfony/serializer-pack": "*",
    "symfony/swiftmailer-bundle": "^3.1",
    "symfony/twig-bundle": "^4.1",
    "symfony/validator": "^4.1",
    "symfony/web-link": "^4.1",
    "symfony/webpack-encore-pack": "*",
    "symfony/yaml": "^4.1"
}

I hope this helps you (or another contributor) to fix this issue.

regniblod commented 6 years ago

Any news here? I saw the commits but there's no new release.

moein commented 6 years ago

@regniblod I'm changing the tests to work with symfony4 There will be a branch for version 1.x and jade will move to the same versioning as symfony (4.x) If you want you can take over the tests and finish my work

moein commented 6 years ago

@regniblod Can you take over 4.x-migration branch?

richgerdes commented 5 years ago

I'm interested in seeing this branch/migration land. And willing to put in some effort to get it there.

Do you remember what's left for this migration?

moein commented 5 years ago

@roygoldman As mentioned only tests that are failing with symfony 4 The implementation itself is done and working

richgerdes commented 5 years ago

I've opened #20, which does the basic adaption of tests for symfony 4.x. I'm not super familiar with codeception, but tests pass locally. Please review when you get a chance, and let me know if you need this to be implemented differently

trivago-msanchez commented 5 years ago

I've just merged #20 into 4.x-migration branch. @moein if you create a PR from that branch to master we can review all changes together.

FYI @roygoldman