Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Pierstoval
Copy link
Contributor

This fixes #408

This update is only made for working tests, but actually there's no guarantee that the whole bundle will work without problem.

I'm gonna test this a bit more.

@Pierstoval
Copy link
Contributor Author

The build for the --prefer-lowest env option systematically fails, any idea?
/cc @ogizanagi @javiereguiluz @xabbuh

@ogizanagi
Copy link
Contributor

@Pierstoval : Can you just try with a fixed version and more recent of the symfony/dependency-injection component in it 2.3 version ?

@Pierstoval
Copy link
Contributor Author

You mean when we have the lowest env var we specify another version of the symfony/dependency-injection package ?

@ogizanagi
Copy link
Contributor

I mean explicitly add the requirement in the composer.json, which should normally be done by the bundles in the proper 2.3 version, but it's just to test.
The problem is that the travis script still tries to add the whole symfony/symfony, and I just wonder if it could came from a wrong version.

@Pierstoval
Copy link
Contributor Author

It works well but the build for Symfony 2.8-dev does not work because now we have many packages to update, not only the whole framework.

Any idea on how to update all packages without ugly things like this :
cat composer.json | sed "s/(symfony[^:]+: \")~2.3/\$1$SYMFONY_VERSION/g" > composer.json2

@ogizanagi
Copy link
Contributor

The 2.8 build was already broken because of a bug introduced in the 2.8 branch in the symfony/config component. I submitted a PR (symfony/symfony#15593), but I didn't have any echo so far.

@Pierstoval
Copy link
Contributor Author

Yeah it's ok, but actually this does not solve the packages update in tests :D

Before we could do composer require --dev --no-update symfony/symfony:$SYMFONY_VERSION,
but now that we don't require the whole framework, this will lead to downloading the framework (which is wrong if we want the bundle to be standalone)

@ogizanagi
Copy link
Contributor

Any idea on how to update all packages without ugly things like this :
cat composer.json | sed "s/(symfony[^:]+: ")~2.3/$1$SYMFONY_VERSION/g" > composer.json2

Indeed, I don't see any better solution right now.

composer.json Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For which feature is it actually needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To check app.user in the navigation bar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is not a hard requirement right ? The feature will simply be activated if the security is used, and the bundle will not fail if the package doesn't exist in the application ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I have not tested in proper app, only using phpunit, and it's required. But I don't know if it should be in require or require-dev 😕

@Pierstoval
Copy link
Contributor Author

So, there are still many issues with requiring only pieces of the framework.

First, we require 30 of them (of 44 for 2.7 and 37 for 2.3, not including "replaces") when we include the require-dev.

And there's a big bug with the twig bridge that requires security component that is splitted in several packages. Only for 2.3 though.

We cannot require them explicitly because it would need SF2.4+ (first split of the component).
And if we require only symfony/security, then the symfony/twig-bridge will require symfony/security-acl which requires symfony/security-core , which completely breaks the thing in 2.3...

Any idea ?

Should it be proposed in the symfony main repo ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list looks too large. Are you sure that all of them a really required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this list is large because we need "few" dependencies, but each of them require some other packages, so to avoid having last-stable installations (which may cause conflicts), I had to require them all in the composer.json. Some other are required in the tests so I put them in the require-dev part.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho it's wrong to add packages that are required by packages you require. This totally contradicts why semver was introduced. You should simply load the packages you need and they should properly manage what they need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tested the basic requirements, I had some issues in the tests about some packages having "higher" requirements that broke some tests. Especially for the different versions of symfony where dependencies about security that were splitted, twig-bundle requiring splitted components, etc.

IMO we should keep requiring the whole framework.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you remember an example of a conflict you had?

@javiereguiluz
Copy link
Collaborator

Closing it as fixed by #438. @Pierstoval thanks a lot for working on this PR and for all the help provided in the merged PR. Your continuous help is truly appreciated!

@Pierstoval Pierstoval deleted the symfony_deps branch September 15, 2015 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete Symfony Framework in composer.json
4 participants