Skip to content

Commit

Permalink
[TASK] Fix composer.json for packagist
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryd committed Jan 23, 2020
1 parent f6c90c8 commit 76cc5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"realurl"
],
"replace": {
"realurl": "self.version",
"dmitryd/typo3-realurl": "self.version",
"typo3-ter/realurl": "self.version"
},
"require": {
Expand Down

10 comments on commit 76cc5e7

@baschny
Copy link

Choose a reason for hiding this comment

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

@dmitryd this change made the composer installers install the extension in typo3conf/ext/typo3-realurl, because the TYPO3 Composer Installers try to figure out the extension key by looking into the "replaces" statement and finding one that is without a vendor.

See: https://github.com/TYPO3/CmsComposerInstallers/blob/master/src/Plugin/Util/ExtensionKeyResolver.php#L38

So either @helhum @bmack improve the "extension key resolution" algorithm, or you re-add the line:

"realurl": "self.version"

What do you think?

@helhum
Copy link
Contributor

@helhum helhum commented on 76cc5e7 Jul 29, 2020

Choose a reason for hiding this comment

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

Extension key can (and should) be defined in the extra section extra/typo3-cms/extension-key

@baschny
Copy link

Choose a reason for hiding this comment

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

@helhum Only starting with typo3/cms-composer-installers 1.4.0 - which then fixes this issue. Problem is that 1.4.x requires PHP 7.0, so you get 1.3.2 installed on a PHP 5.x installation, which means it fails due to do that. As I discovered later on (see #686).

@bmack
Copy link

@bmack bmack commented on 76cc5e7 Jul 30, 2020

Choose a reason for hiding this comment

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

So @baschny you're saying: You'd love to have a 1.3.3 version which works with PHP 5.x and contains this feature for detecting the extension key in the extra section?

@baschny
Copy link

Choose a reason for hiding this comment

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

I for myself am neutral, as we "solved the issue in our environments". To solve it for the community, either:

a. @dmitryd readds the "replaces" which was removed or
b. we indeed have a 1.3.3 adding the additional detection or
c. we figure that people will use google and find the issue and apply to solution to stick with realurl 2.5.x.

"a" is easiest to do, but with "b" potentially other extensions could also benefit from it (who knows??). Since both are not my "childs", you have to decide.

@bmack
Copy link

@bmack bmack commented on 76cc5e7 Jul 30, 2020

Choose a reason for hiding this comment

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

The main issue with the "replaces" section is that writing "replaces": {"extension_key": "*"} will not be compatible with composer v2. But that again is another topic... Using latest composer with a very old PHP version and a very old TYPO3 version...

If somebody needs it, I'd be in favor of "b)". As long as everybody has found a solution, I can live without any changes here.

@helhum
Copy link
Contributor

@helhum helhum commented on 76cc5e7 Jul 30, 2020

Choose a reason for hiding this comment

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

Only starting with typo3/cms-composer-installers 1.4.0

Ah, right and I see this is fixed already here:
740627f

1.4.x requires PHP 7.0, so you get 1.3.2 installed on a PHP 5.x installation

So it is about TYPO3 6.2 compatiblity? I see no reason to run a 8.7 with PHP 5.x, is there?

a. @dmitryd readds the "replaces" which was removed
The main issue with the "replaces" section is that writing "replaces": {"extension_key": "*"} will not be compatible with composer v2

This option is out, no because lacking Composer 2.0 support, but because of Packagist denying packages with invalid replaces section.

@helhum
Copy link
Contributor

@helhum helhum commented on 76cc5e7 Jul 30, 2020

Choose a reason for hiding this comment

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

I released 1.3.3 with the backported functionality.

@baschny
Copy link

@baschny baschny commented on 76cc5e7 Oct 7, 2020

Choose a reason for hiding this comment

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

I just stumbled over this "again", and 1.3.3 indeed works, thanks @helhum! If it doesn't work up-front clearing up "vendors" before doing the composer update will help (or maybe running composer update twice).

@dmitryd
Copy link
Owner Author

@dmitryd dmitryd commented on 76cc5e7 Nov 8, 2020

Choose a reason for hiding this comment

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

So, is there anything else to do here?

Please sign in to comment.