Skip to content

Commit

Permalink
feat: use new subproject names
Browse files Browse the repository at this point in the history
- Expressive -> Mezzio
- Apigility -> Laminas API Tools
  • Loading branch information
weierophinney committed Dec 2, 2019
1 parent 5779e47 commit deeda02
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 0.1.4 - TBD
## 0.2.0 - 2019-12-02

### Added

- Nothing.

### Changed

- Nothing.
- [#3](https://github.com/laminas/laminas-dependency-plugin/pull/3) updates the tooling to rewrite Apigility packages to reference laminas-api-tools and api-tools.

- [#3](https://github.com/laminas/laminas-dependency-plugin/pull/3) updates the tooling to rewrite Expressive packages to reference Mezzio.

### Deprecated

Expand Down
14 changes: 7 additions & 7 deletions src/DependencyRewriterPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ private function transformPackageName($name)
case 'zendframework/zendxml':
return 'laminas/laminas-xml';
case 'zendframework/zend-expressive':
return 'expressive/expressive';
return 'mezzio/mezzio';
case 'zendframework/zend-problem-details':
return 'expressive/expressive-problem-details';
case 'zfcampus/zf-apigilty':
return 'apigility/apigility';
return 'mezzio/mezzio-problem-details';
case 'zfcampus/zf-apigility':
return 'laminas-api-tools/api-tools';
case 'zfcampus/zf-composer-autoloading':
return 'laminas/laminas-composer-autoloading';
case 'zfcampus/zf-deploy':
Expand All @@ -298,13 +298,13 @@ private function transformPackageName($name)
// All other packages:
default:
if (preg_match('#^zendframework/zend-expressive-(?<name>.*)$#', $name, $matches)) {
return sprintf('expressive/expressive-%s', $matches['name']);
return sprintf('mezzio/mezzio-%s', $matches['name']);
}
if (preg_match('#^zfcampus/zf-apigility-(?<name>.*)$#', $name, $matches)) {
return sprintf('apigility/apigility-%s', $matches['name']);
return sprintf('laminas-api-tools/api-tools-%s', $matches['name']);
}
if (preg_match('#^zfcampus/zf-(?<name>.*)$#', $name, $matches)) {
return sprintf('apigility/apigility-%s', $matches['name']);
return sprintf('laminas-api-tools/api-tools-%s', $matches['name']);
}
if (preg_match('#^zendframework/zend-(?<name>.*)$#', $name, $matches)) {
return sprintf('laminas/laminas-%s', $matches['name']);
Expand Down
12 changes: 6 additions & 6 deletions test/DependencyRewriterPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public function testOnPreCommandRewritesZFPackageArguments() : void
'packages',
[
'laminas/laminas-form',
'apigility/apigility-content-negotiation',
'expressive/expressive-hal',
'laminas-api-tools/api-tools-content-negotiation',
'mezzio/mezzio-hal',
]
)
->shouldBeCalled();
Expand Down Expand Up @@ -312,7 +312,7 @@ public function testOnPreDependenciesSolvingReplacesZFPackagesWithSubstitutions(
->write(
Argument::containingString(
'Replacing package "zendframework/zend-expressive-template" with'
. ' package "expressive/expressive-template"'
. ' package "mezzio/mezzio-template"'
),
true,
IOInterface::VERBOSE
Expand All @@ -322,7 +322,7 @@ public function testOnPreDependenciesSolvingReplacesZFPackagesWithSubstitutions(
$this->io
->write(
Argument::containingString(
'Replacing package "zfcampus/zf-apigility" with package "apigility/apigility-apigility"'
'Replacing package "zfcampus/zf-apigility" with package "laminas-api-tools/api-tools"'
),
true,
IOInterface::VERBOSE
Expand All @@ -345,13 +345,13 @@ public function testOnPreDependenciesSolvingReplacesZFPackagesWithSubstitutions(
],
[
'cmd' => 'update',
'packageName' => 'expressive/expressive-template',
'packageName' => 'mezzio/mezzio-template',
'constraint' => null,
'fixed' => false,
],
[
'cmd' => 'update',
'packageName' => 'apigility/apigility-apigility',
'packageName' => 'laminas-api-tools/api-tools',
'constraint' => null,
'fixed' => false,
],
Expand Down

0 comments on commit deeda02

Please sign in to comment.