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

4.4.9+ still requires only core-bundle ^4.4.2 #27

Closed
fritzmg opened this issue Jan 17, 2018 · 13 comments
Closed

4.4.9+ still requires only core-bundle ^4.4.2 #27

fritzmg opened this issue Jan 17, 2018 · 13 comments
Assignees
Labels
Milestone

Comments

@fritzmg
Copy link
Contributor

fritzmg commented Jan 17, 2018

contao/core-bundle 4.4.9 introduced the Model::isPreviewMode function, which is also used in contao/news-bundle (and the other bundles) starting with 4.4.9.

However, the composer.json was never changed to reflect that new dependency, it still only says:

"contao/core-bundle": "^4.4.2"

So if the core-bundle cannot be updated to 4.4.9+ but the news-bundle for example can be updated to 4.4.9+, you will get the error

… isPreviewMode does not exist

These circumstances can happen, if your PHP version is >=7.0.0,<7.0.8. The contao/core-bundle has a dependency on

"symfony/console": "^3.3.7"

since version 4.4.8. Thus contao/core-bundle cannot be updated to 4.4.8+ under PHP >=7.0.0,<7.0.8, because symfony/console 3.3.7+ requires at least PHP 7.0.8. The contao/news-bundle can be updated to 4.4.12 without any problems under PHP >=7.0.0,<7.0.8.

@leofeyer leofeyer added this to the 4.4.13 milestone Jan 17, 2018
@leofeyer
Copy link
Member

Also should be fixed in the calendar bundle and probably others.

@fritzmg
Copy link
Contributor Author

fritzmg commented Jan 17, 2018

Indeed. But when you change this for 4.4.13, the release tags 4.4.9, 4.4.10, 4.4.11, 4.4.12 have to be deleted, otherwise the problem will continue to exist. Would that have any adverse affects?

@leofeyer
Copy link
Member

We must not delete tags. If necessary we can relocate them, but I don't know if it is necessary in this case. @contao/developers /cc

@fritzmg
Copy link
Contributor Author

fritzmg commented Jan 17, 2018

Well as long as the 4.4.9 - 4.4.12 tags with their current content are there in the news-bundle etc., the problem will exist, since any composer update will always at least update those bundles to 4.4.12, even if the core-bundle cannot be updated to 4.4.9+, which will lead to this error.

The circumstances under which I discovered this are probably pretty rare. I doubt there are many hostings out there that provide PHP 7.0 with a version lower than 7.0.8. However theoretically, there could be other reasons (i.e. other dependencies) that might prevent the core-bundle from being updated to a higher version which are not immediately apparent.

@leofeyer
Copy link
Member

As discussed in Mumble on January 18th, 2018, we do not want to relocate the tags, because it seems wrong. Instead we need to prevent this from happening in the future, which e.g. could be accomplished by using self.version.

@leofeyer
Copy link
Member

E.g. in the calendar bundle:

{
    "name": "contao/calendar-bundle",
    "type": "contao-bundle",
    "description": "Adds calendar functionality to Contao 4",
    "license": "LGPL-3.0+",
    "require": {
        "php": "^7.1",
        "contao/core-bundle": "self.version",
        "symfony/framework-bundle": "^3.4"
    },

@leofeyer
Copy link
Member

leofeyer commented Jan 19, 2018

@leofeyer
Copy link
Member

Besides Jordi's comments, using self.version works pretty well. It even requires the 4.4.x-dev branch of the core bundle if it is on the 4.4.x-dev branch itself, which is great.

@leofeyer
Copy link
Member

leofeyer commented Jan 19, 2018

Of course you cannot have the core bundle in version 4.4.8 and the calendar bundle in version 4.4.9 with self.version, in case there is a bug in the core bundle that requires you to downgrade. It would force you to downgrade all bundles, which is probably not desirable.

@ausi
Copy link
Member

ausi commented Jan 19, 2018

As far as I understand it, Jordi’s comment are not about self.version in general but about using self.version in a root project and about a suggested feature ^self.version and ~self.version.

@aschempp
Copy link
Member

Of course you cannot have the core bundle in version 4.4.8 and the calendar bundle in version 4.4.9 with self.version

I think you can, by just writing contao/core-bundle: 4.4.8 as 4.4.9? 😁

leofeyer added a commit to contao/calendar-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/comments-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/faq-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/installation-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/listing-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/manager-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/newsletter-bundle that referenced this issue Jan 22, 2018
leofeyer added a commit to contao/comments-bundle that referenced this issue Jan 22, 2018
@leofeyer leofeyer self-assigned this Jan 22, 2018
@leofeyer
Copy link
Member

Implemented as discussed.

@fritzmg
Copy link
Contributor Author

fritzmg commented Apr 25, 2018

This adjustment is missing in the contao/manager-bundle. If you are using a PHP version that is >=7.0.0,<7.0.8 this will lead to the core-bundle being 4.4.7 and the manager-bundle being 4.4.18. In that case the Contao Manager will show the "Contao Open Source CMS" as version 4.4.18, while the actual Contao back end will show the Contao version as 4.4.7.

@leofeyer leofeyer modified the milestones: 4.4.13, 4.4 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants