Skip to content

Commit

Permalink
fix(php-yoshi): remove manifest.json, Version.php, and ServiceBuilder…
Browse files Browse the repository at this point in the history
….php (#1949)

* chore: remove manifest.json, Version.php, and ServiceBuilder.php

* remove php-manifest updater test

---------

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
bshaffer and chingor13 committed May 25, 2023
1 parent 417fd5e commit 09fb84b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 188 deletions.
31 changes: 1 addition & 30 deletions src/strategies/php-yoshi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions} from './base';
import {Update} from '../update';
import {Changelog} from '../updaters/changelog';
import {RootComposerUpdatePackages} from '../updaters/php/root-composer-update-packages';
import {PHPManifest} from '../updaters/php/php-manifest';
import {PHPClientVersion} from '../updaters/php/php-client-version';
import {VersionsMap, Version} from '../version';
import {Commit, parseConventionalCommits} from '../commit';
Expand Down Expand Up @@ -242,8 +241,7 @@ export class PHPYoshi extends BaseStrategy {
}),
});

// update the aggregate package information in the root
// composer.json and manifest.json.
// update the aggregate package information in the root composer.json
updates.push({
path: this.addPath('composer.json'),
createIfMissing: false,
Expand All @@ -253,33 +251,6 @@ export class PHPYoshi extends BaseStrategy {
}),
});

updates.push({
path: this.addPath('docs/manifest.json'),
createIfMissing: false,
updater: new PHPManifest({
version,
versionsMap,
}),
});

updates.push({
path: this.addPath('src/Version.php'),
createIfMissing: false,
updater: new PHPClientVersion({
version,
versionsMap,
}),
});

updates.push({
path: this.addPath('src/ServiceBuilder.php'),
createIfMissing: false,
updater: new PHPClientVersion({
version,
versionsMap,
}),
});

return updates;
}
}
Expand Down
58 changes: 0 additions & 58 deletions src/updaters/php/php-manifest.ts

This file was deleted.

4 changes: 0 additions & 4 deletions test/strategies/php-yoshi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {TagName} from '../../src/util/tag-name';
import {Version} from '../../src/version';
import {Changelog} from '../../src/updaters/changelog';
import {RootComposerUpdatePackages} from '../../src/updaters/php/root-composer-update-packages';
import {PHPManifest} from '../../src/updaters/php/php-manifest';
import {PHPClientVersion} from '../../src/updaters/php/php-client-version';
import {DefaultUpdater} from '../../src/updaters/default';
import snapshot = require('snap-shot-it');
Expand Down Expand Up @@ -152,9 +151,6 @@ describe('PHPYoshi', () => {
const updates = release!.updates;
assertHasUpdate(updates, 'CHANGELOG.md', Changelog);
assertHasUpdate(updates, 'composer.json', RootComposerUpdatePackages);
assertHasUpdate(updates, 'docs/manifest.json', PHPManifest);
assertHasUpdate(updates, 'src/Version.php', PHPClientVersion);
assertHasUpdate(updates, 'src/ServiceBuilder.php', PHPClientVersion);
});
it('finds touched components', async () => {
const strategy = new PHPYoshi({
Expand Down
55 changes: 0 additions & 55 deletions test/updaters/fixtures/php/manifest.json

This file was deleted.

41 changes: 0 additions & 41 deletions test/updaters/php-manifest.ts

This file was deleted.

0 comments on commit 09fb84b

Please sign in to comment.