Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12783

Remove require: phpbb/phpbb from Extensions composer.json files

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-RC1
    • Fix Version/s: 3.1.0-RC2
    • Component/s: Extensions
    • Labels:
      None

      Description

      We currently check require: phpbb/phpbb

      	public function validate_require_phpbb()
      	{
      		if (!isset($this->metadata['require']['phpbb/phpbb']))
      		{
      			return false;
      		}
       
      		return true;
      	}

      However this blocks using the composer.json file for dependencies of the extension, because no package phpbb/phpbb exists. (Also block stuff like using scrutinizer for code quality and other tools that check the deps)

      We should move that to the extra section as we did with the extensions display-name, so extensions can use dependencies correctly.

        Activity

        Hide
        MichaelC Michael Cullum added a comment - - edited

        The plan was (after discussions between myself, Igor and Nils when we changed the filename from being package.json to composer.json) when 3.1 was released to add phpbb/phpbb to packagist and therefore there would be a phpbb/phpbb.

        Also if you then added an extension to your phpbb installation's composer.json, due to the type field and some changes that i made to composer-installers it should install your extension as a dependency to ext/blah/blah if you added your extension to packagist (or in the future titania).

        This is a step backwards, not forwards.

        Show
        MichaelC Michael Cullum added a comment - - edited The plan was (after discussions between myself, Igor and Nils when we changed the filename from being package.json to composer.json) when 3.1 was released to add phpbb/phpbb to packagist and therefore there would be a phpbb/phpbb. Also if you then added an extension to your phpbb installation's composer.json, due to the type field and some changes that i made to composer-installers it should install your extension as a dependency to ext/blah/blah if you added your extension to packagist (or in the future titania). This is a step backwards, not forwards.
        Hide
        nickvergessen Joas Schilling added a comment -

        Well I see your point and yes you might consider it a step backwards.

        However I think, a step backwards is okay if it works again then. Currently this hidden future feature blocks extensions from using composer. We can also drop the phpbb/phpbb thing completly until we do something with it. We have a requirement that is not fullfillable, no one is going to set up packagist in the near future, so we remove this broken composer dependency for now.
        We do not even validate the value so you can also do phpbb/phpbb === 2.0.0 and it will still be able to install. So really no use at the moment.

        So until https://tracker.phpbb.com/browse/PHPBB3-11150 and https://tracker.phpbb.com/browse/PHPBB3-11840 are fixed, we should remove these values, so extensions can be installed, while having resolvable composer deps.

        Show
        nickvergessen Joas Schilling added a comment - Well I see your point and yes you might consider it a step backwards. However I think, a step backwards is okay if it works again then. Currently this hidden future feature blocks extensions from using composer. We can also drop the phpbb/phpbb thing completly until we do something with it. We have a requirement that is not fullfillable, no one is going to set up packagist in the near future, so we remove this broken composer dependency for now. We do not even validate the value so you can also do phpbb/phpbb === 2.0.0 and it will still be able to install. So really no use at the moment. So until https://tracker.phpbb.com/browse/PHPBB3-11150 and https://tracker.phpbb.com/browse/PHPBB3-11840 are fixed, we should remove these values, so extensions can be installed, while having resolvable composer deps.
        Hide
        rfdy rfdy added a comment -

        We had the same issue and ended up creating a dummy phpbb/phpbb project in our local repo.
        If this isn't going to be used for 3.1, then it would be better to remove it completely until it actual gets used.

        Show
        rfdy rfdy added a comment - We had the same issue and ended up creating a dummy phpbb/phpbb project in our local repo. If this isn't going to be used for 3.1, then it would be better to remove it completely until it actual gets used.
        Hide
        nickvergessen Joas Schilling added a comment -

        Make use of this field is part of the ticket linked above.
        You can now delete your dummy project

        Show
        nickvergessen Joas Schilling added a comment - Make use of this field is part of the ticket linked above. You can now delete your dummy project

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            nickvergessen Joas Schilling
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development