mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/11150] Disable packagist and add titania
PHPBB3-11150
This commit is contained in:
parent
7958dca09d
commit
8ea2ecf835
6 changed files with 47 additions and 43 deletions
|
@ -10,7 +10,7 @@
|
|||
<div class="errorbox">
|
||||
{{ lang('EXTENSIONS_COMPOSER_NOT_WRITABLE') }}
|
||||
</div>
|
||||
{% endif %}I
|
||||
{% endif %}
|
||||
|
||||
<fieldset class="quick quick-left">
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.1" target="_blank">{{ lang('BROWSE_EXTENSIONS_DATABASE') }}</a> • <a href="javascript:phpbb.toggleDisplay('catalog_settings');">{{ lang('SETTINGS') }}</a></span>
|
||||
|
|
|
@ -144,26 +144,27 @@ services:
|
|||
console.command.extension.install:
|
||||
class: phpbb\console\command\extension\install
|
||||
arguments:
|
||||
- @user
|
||||
- @ext.composer.manager
|
||||
- '@user'
|
||||
- '@ext.composer.manager'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.extension.list_available:
|
||||
class: phpbb\console\command\extension\list_available
|
||||
arguments:
|
||||
- @user
|
||||
- @ext.composer.manager
|
||||
- @language
|
||||
- '@user'
|
||||
- '@ext.composer.manager'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.extension.manage:
|
||||
class: phpbb\console\command\extension\manage
|
||||
arguments:
|
||||
- @user
|
||||
- @ext.composer.manager
|
||||
- @language
|
||||
- '@user'
|
||||
- '@ext.composer.manager'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
@ -179,9 +180,9 @@ services:
|
|||
console.command.extension.remove:
|
||||
class: phpbb\console\command\extension\remove
|
||||
arguments:
|
||||
- @user
|
||||
- @ext.composer.manager
|
||||
- @language
|
||||
- '@user'
|
||||
- '@ext.composer.manager'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
@ -197,8 +198,9 @@ services:
|
|||
console.command.extension.update:
|
||||
class: phpbb\console\command\extension\update
|
||||
arguments:
|
||||
- @user
|
||||
- @ext.composer.manager
|
||||
- '@user'
|
||||
- '@ext.composer.manager'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
|
|
@ -2,45 +2,45 @@ services:
|
|||
ext.manager:
|
||||
class: phpbb\extension\manager
|
||||
arguments:
|
||||
- @service_container
|
||||
- @dbal.conn
|
||||
- @config
|
||||
- @filesystem
|
||||
- %tables.ext%
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @cache
|
||||
- '@service_container'
|
||||
- '@dbal.conn'
|
||||
- '@config'
|
||||
- '@filesystem'
|
||||
- '%tables.ext%'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '@cache'
|
||||
|
||||
ext.composer.installer:
|
||||
class: phpbb\composer\installer
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- @config
|
||||
- '%core.root_path%'
|
||||
- '@config'
|
||||
|
||||
ext.composer.manager:
|
||||
class: phpbb\composer\extension_manager
|
||||
arguments:
|
||||
- @ext.composer.installer
|
||||
- @cache.driver
|
||||
- @ext.manager
|
||||
- @filesystem
|
||||
- '@ext.composer.installer'
|
||||
- '@cache.driver'
|
||||
- '@ext.manager'
|
||||
- '@filesystem'
|
||||
- phpbb-extension
|
||||
- EXTENSIONS_
|
||||
- %core.root_path%
|
||||
- @config
|
||||
- '%core.root_path%'
|
||||
- '@config'
|
||||
|
||||
style.composer.manager:
|
||||
class: phpbb\composer\manager
|
||||
arguments:
|
||||
- @ext.composer.installer
|
||||
- @cache.driver
|
||||
- '@ext.composer.installer'
|
||||
- '@cache.driver'
|
||||
- phpbb-style
|
||||
- STYLES_
|
||||
|
||||
lang.composer.manager:
|
||||
class: phpbb\composer\manager
|
||||
arguments:
|
||||
- @ext.composer.installer
|
||||
- @cache.driver
|
||||
- '@ext.composer.installer'
|
||||
- '@cache.driver'
|
||||
- phpbb-language
|
||||
- LANGUAGES_
|
||||
|
|
|
@ -164,7 +164,7 @@ $lang = array_merge($lang, array(
|
|||
'EXTENSIONS_REMOVED' => 'Extensions successfully removed.',
|
||||
'EXTENSIONS_UPDATED' => 'Extensions successfully updated.',
|
||||
|
||||
'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'TODO: some required files / directory are not writable => disable ',
|
||||
'EXTENSIONS_COMPOSER_NOT_WRITABLE' => 'In order to use the catalog, the following files and directories must be writable: ext/ vendor-ext/ composer-ext.json and composer-ext.json.lock',
|
||||
|
||||
'STABILITY_STABLE' => 'stable',
|
||||
'STABILITY_RC' => 'RC',
|
||||
|
|
|
@ -20,10 +20,10 @@ use Composer\IO\NullIO;
|
|||
use Composer\Json\JsonFile;
|
||||
use Composer\Package\BasePackage;
|
||||
use Composer\Package\CompletePackage;
|
||||
use Composer\Package\LinkConstraint\LinkConstraintInterface;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\ComposerRepository;
|
||||
use Composer\Repository\RepositoryInterface;
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
use Composer\Util\RemoteFilesystem;
|
||||
use phpbb\config\config;
|
||||
use phpbb\exception\runtime_exception;
|
||||
|
@ -85,7 +85,7 @@ class installer
|
|||
{
|
||||
$repositories = json_decode($config['exts_composer_repositories'], true);
|
||||
|
||||
if (!is_array($repositories) && !empty($repositories))
|
||||
if (is_array($repositories) && !empty($repositories))
|
||||
{
|
||||
$this->repositories = (array) $repositories;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ class installer
|
|||
$io = new NullIO();
|
||||
$composer = Factory::create($io, $this->get_composer_ext_json_filename(), false);
|
||||
|
||||
/** @var LinkConstraintInterface $core_constraint */
|
||||
/** @var ConstraintInterface $core_constraint */
|
||||
$core_constraint = $composer->getPackage()->getRequires()['phpbb/phpbb']->getConstraint();
|
||||
$core_stability = $composer->getPackage()->getMinimumStability();
|
||||
|
||||
|
@ -430,14 +430,14 @@ class installer
|
|||
* Updates $compatible_packages with the versions of $versions compatibles with the $core_constraint
|
||||
*
|
||||
* @param array $compatible_packages List of compatibles versions
|
||||
* @param LinkConstraintInterface $core_constraint Constraint against the phpBB version
|
||||
* @param ConstraintInterface $core_constraint Constraint against the phpBB version
|
||||
* @param string $core_stability Core stability
|
||||
* @param string $package_name Considered package
|
||||
* @param array $versions List of available versions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function get_compatible_versions(array $compatible_packages, LinkConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
|
||||
private function get_compatible_versions(array $compatible_packages, ConstraintInterface $core_constraint, $core_stability, $package_name, array $versions)
|
||||
{
|
||||
$core_stability_value = BasePackage::$stabilities[$core_stability];
|
||||
//VersionParser::parseStability($version['version'])
|
||||
|
@ -451,7 +451,7 @@ class installer
|
|||
|
||||
if (array_key_exists('phpbb/phpbb', $version->getRequires()))
|
||||
{
|
||||
/** @var LinkConstraintInterface $package_constraint */
|
||||
/** @var ConstraintInterface $package_constraint */
|
||||
$package_constraint = $version->getRequires()['phpbb/phpbb']->getConstraint();
|
||||
|
||||
if (!$package_constraint->matches($core_constraint))
|
||||
|
|
|
@ -18,8 +18,10 @@ class extensions_composer extends \phpbb\db\migration\migration
|
|||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.add', array('exts_composer_repositories', json_encode([], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))),
|
||||
array('config.add', array('exts_composer_packagist', true)),
|
||||
array('config.add', array('exts_composer_repositories', json_encode([
|
||||
'https://www.phpbb.com/customise/db/composer/',
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES))),
|
||||
array('config.add', array('exts_composer_packagist', false)),
|
||||
array('config.add', array('exts_composer_json_file', 'composer-ext.json')),
|
||||
array('config.add', array('exts_composer_vendor_dir', 'vendor-ext/')),
|
||||
array('config.add', array('exts_composer_enable_on_install', false)),
|
||||
|
|
Loading…
Add table
Reference in a new issue