-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[packagist] api v2 support #7575
Commits on Feb 6, 2022
-
Update Packagist service to use v2 api
Packagist deprecated the original `packagist.org/p/username/package` endpoint in favor of v2 `packagist.org/p2/username/package` endpoint. Because of this, new packages aren't being found using v1. This PR updates the Packagist service to use the new endpoint.
Configuration menu - View commit details
-
Copy full SHA for 2a87125 - Browse repository at this point
Copy the full SHA 2a87125View commit details -
Some packages don't return the same data structure as others with the new api endpoints. This changes the validation schema to account for the potential differences.
Configuration menu - View commit details
-
Copy full SHA for 90694b2 - Browse repository at this point
Copy the full SHA 90694b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7e39af - Browse repository at this point
Copy the full SHA b7e39afView commit details -
Configuration menu - View commit details
-
Copy full SHA for efeee15 - Browse repository at this point
Copy the full SHA efeee15View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd567c7 - Browse repository at this point
Copy the full SHA dd567c7View commit details -
Address issues raised by reviewer
Address issues raised by @chris48s in badges#6508, which this PR is base on. Includes: * Remove getDefaultBranch() from base class for it is no longer used. * Change try-catch statement syntax to align code style. * Rename findRelease() to findLatestRelease() for clarity.
Configuration menu - View commit details
-
Copy full SHA for cb68e95 - Browse repository at this point
Copy the full SHA cb68e95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 633021a - Browse repository at this point
Copy the full SHA 633021aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d43736 - Browse repository at this point
Copy the full SHA 8d43736View commit details -
Configuration menu - View commit details
-
Copy full SHA for 714c5d6 - Browse repository at this point
Copy the full SHA 714c5d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d04934f - Browse repository at this point
Copy the full SHA d04934fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b66398 - Browse repository at this point
Copy the full SHA 4b66398View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d7af3a - Browse repository at this point
Copy the full SHA 1d7af3aView commit details
Commits on Feb 9, 2022
-
Improve BasePackagistService testing
* Change BasePackagistService.decompressResponse to static method BasePackagistService.expandPackageVersions. * Fix expandPackageVersions implementation. * Add unit test for the function.
Configuration menu - View commit details
-
Copy full SHA for 928081f - Browse repository at this point
Copy the full SHA 928081fView commit details -
Extend BasePackagistService.findLatestRelease
* extend BasePackagistService.findLatestRelease to also handle PackagistVersion. * remove PackagistVersion.transform.
Configuration menu - View commit details
-
Copy full SHA for 77835c3 - Browse repository at this point
Copy the full SHA 77835c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 352ad3c - Browse repository at this point
Copy the full SHA 352ad3cView commit details
Commits on Feb 10, 2022
-
Improve BasePackagistService.findLatestRelease
* Update findLatestRelease to throw NotFound itself. * Update PackagistLicense and PackagistVersion and remove the NotFound throwing logics.
Configuration menu - View commit details
-
Copy full SHA for 6497c3b - Browse repository at this point
Copy the full SHA 6497c3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64b8592 - Browse repository at this point
Copy the full SHA 64b8592View commit details
Commits on Feb 11, 2022
-
Corrected packagist php version spec
* The test was on a false assumption that '__unset' might appear inside an array leaf while the composer's MetadataMinifier::minify never does thing recursively. The '__unset' should be value of the top level key.
Configuration menu - View commit details
-
Copy full SHA for b164565 - Browse repository at this point
Copy the full SHA b164565View commit details
Commits on Feb 17, 2022
-
* improve jsDoc to the PackagistPhpVersion class. * simplified PackagistPhpVersion.getPhpVersion logics and remove fetchDev from getPhpVersion method. * update tests accordingly.
Configuration menu - View commit details
-
Copy full SHA for e5b31cd - Browse repository at this point
Copy the full SHA e5b31cdView commit details -
* migrate expandPackageVersions usage to handle to simplify getPhpVersion logics.
Configuration menu - View commit details
-
Copy full SHA for eb06baf - Browse repository at this point
Copy the full SHA eb06bafView commit details -
Fix PackagistVersion issue with unexpanded versions
* fix potential issues where the versions array is unexpanded.
Configuration menu - View commit details
-
Copy full SHA for 19fa292 - Browse repository at this point
Copy the full SHA 19fa292View commit details -
Refactor PAckagistLicenseService
* rename method "transform" into "getVersion" to better describe its use. * moved usage of expandPackageVersions into handle function.
Configuration menu - View commit details
-
Copy full SHA for 3ff0ee8 - Browse repository at this point
Copy the full SHA 3ff0ee8View commit details -
Refactor all expandPackageVersions call into fetchVersions
* Rename BasePackageService.fetch method as fetchRelease. * Add a new fetch method that calls fetchRelease. Extract all expandPackageVersions calls from handle methods of different child class into fetchRelease.
Configuration menu - View commit details
-
Copy full SHA for 36c4a23 - Browse repository at this point
Copy the full SHA 36c4a23View commit details -
Convert BasePackagistService.findLatestRelease into static method
* More reasonable defination.
Configuration menu - View commit details
-
Copy full SHA for dba0fba - Browse repository at this point
Copy the full SHA dba0fbaView commit details -
Move findSpecifiedVersion in packagist service
* Move method findSpecifiedVersion from PackagistPhpVersionService to BasePackagistService as a static method.
Configuration menu - View commit details
-
Copy full SHA for ba29586 - Browse repository at this point
Copy the full SHA ba29586View commit details -
Reformat BasePackagistService test
* moved method specific test data into the test itself.
Configuration menu - View commit details
-
Copy full SHA for 612f54b - Browse repository at this point
Copy the full SHA 612f54bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74c3f8b - Browse repository at this point
Copy the full SHA 74c3f8bView commit details -
Reduce repeated call to the same schema
* rename allVersionSchema into composerMetadatApiSchema to better describe what it is. * make composerMetadatApiSchema the default value of schema in fetchVersions, fetchRelease and fetchDev. Remove explicit import and use of composerMetadatApiSchema from child services.
Configuration menu - View commit details
-
Copy full SHA for 2af02fd - Browse repository at this point
Copy the full SHA 2af02fdView commit details -
Packagist: Unify the way to find suitable package
* unify all version search into a single BasePackagistService.findVersion method.
Configuration menu - View commit details
-
Copy full SHA for 1bde0b3 - Browse repository at this point
Copy the full SHA 1bde0b3View commit details -
Improve test coverage on BasePackagistService
* Add test coverage of findSpecifiedVersion. * Add test coverage of findLatestVersion.
Configuration menu - View commit details
-
Copy full SHA for 199d7ea - Browse repository at this point
Copy the full SHA 199d7eaView commit details -
Add option to BasePackagistService.findVersion
* Add a includeDefaultBranch flag in findVersion to also search for metadata of default branch.
Configuration menu - View commit details
-
Copy full SHA for e0e6e65 - Browse repository at this point
Copy the full SHA e0e6e65View commit details -
Simplified PackagistPhpVersion.getPhpVersion
* simplified parameter list of getPhpVersion
Configuration menu - View commit details
-
Copy full SHA for 5c134eb - Browse repository at this point
Copy the full SHA 5c134ebView commit details -
Improve PackagistPhpVersionService testing
* resurrected some of the relevant older tests. * remove the api json array expand logics from test.
Configuration menu - View commit details
-
Copy full SHA for 1d93442 - Browse repository at this point
Copy the full SHA 1d93442View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4782fc1 - Browse repository at this point
Copy the full SHA 4782fc1View commit details -
Refactor and documentation BasePackagistService
* Moved expandPackageVersions calls into fetchRelease and fetchDev. The return values needed to be expanded anyway. * Rename fetchVersions as fetch to make it closer resembling the current stable version. * Improve documentations.
Configuration menu - View commit details
-
Copy full SHA for 2ce31b7 - Browse repository at this point
Copy the full SHA 2ce31b7View commit details -
Simplify PackagistVersion fetch call
* Use fetchRelease instead of fetch. Less API calls.
Configuration menu - View commit details
-
Copy full SHA for cf195bf - Browse repository at this point
Copy the full SHA cf195bfView commit details -
Simplifiy fetch used in packagist license and php version service
* Only fetch the ~dev.json endpoint if needed.
Configuration menu - View commit details
-
Copy full SHA for cb470f4 - Browse repository at this point
Copy the full SHA cb470f4View commit details -
* export error message string as constant and reuse in tests
Configuration menu - View commit details
-
Copy full SHA for 83932b4 - Browse repository at this point
Copy the full SHA 83932b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac771b1 - Browse repository at this point
Copy the full SHA ac771b1View commit details
Commits on Mar 1, 2022
-
Fix service.js file export issue
* Move all messages constant to base class file. Ensure *.service.js exports only services or collection of services.
Configuration menu - View commit details
-
Copy full SHA for c6ef489 - Browse repository at this point
Copy the full SHA c6ef489View commit details -
Add a new findDefaultBranchVersion method in PackagistBase
* Off load the default branch searching logics from findLatestRelease to findDefaultBranchVersion. Implement Packagist default logic to search for default metadata to display.
Configuration menu - View commit details
-
Copy full SHA for 2f4bdee - Browse repository at this point
Copy the full SHA 2f4bdeeView commit details -
Partially fix issues with the latest refactoring
* fix documentation in fetchRelease and fetchDev. * use await keyword in usage of fetchRelease and fetchDev to get reasonable results.
Configuration menu - View commit details
-
Copy full SHA for 45a603c - Browse repository at this point
Copy the full SHA 45a603cView commit details
Commits on Mar 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 54d5604 - Browse repository at this point
Copy the full SHA 54d5604View commit details