Skip to content
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

[BUGFIX] Fix handling of InstalledPackagesTrait #2

Merged
merged 2 commits into from Jan 13, 2021

Conversation

eliashaeussler
Copy link
Member

This PR is a follow-up to #1. It includes:

  • Use of $resolvedPackages instead of serialized $installedPackages
  • Fix of test cases for InstalledPackagesTrait

Usage of correct property

With #1, var_export() was replaced by serialize(). Therefore the BundleDescriber class property $installedPackages does no longer contain an array, but rather its serialized representation. This leads to the fact that in case one uses the InstalledPackagesTrait to access this property, it needs to be resolved first (using unserialize() on first access – this was already handled with #1) and should then return the resolved values from $resolvedPackages.

With #1, this was only partially implemented and has now been streamlined. Since the InstalledPackagesTraitTest was currently not included in the test execution workflow, those problems have not been discovered.

Fix of InstalledPackagesTraitTest

The Unit test class for InstalledPackagesTrait was currently not registered at the expected directory tests/Unit. This has now been streamlined and the tests have been adapted to the previous mentioned modifications in InstalledPackagesTrait.

@eliashaeussler eliashaeussler added the bug Something isn't working label Jan 13, 2021
@sonarcloud
Copy link

sonarcloud bot commented Jan 13, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@dwenzel dwenzel merged commit 98bf372 into develop Jan 13, 2021
@eliashaeussler eliashaeussler deleted the feature/fix-installed-packages-trait branch February 11, 2021 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants