Skip to content

refactoring, added phpunit, laminas coding standard, psalm and tests#25

Merged
alexmerlin merged 6 commits into3.0from
issue-21
Jul 12, 2023
Merged

refactoring, added phpunit, laminas coding standard, psalm and tests#25
alexmerlin merged 6 commits into3.0from
issue-21

Conversation

@pinclau
Copy link
Copy Markdown
Member

@pinclau pinclau commented Jul 10, 2023

No description provided.

Copy link
Copy Markdown
Member

@alexmerlin alexmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of issues to be addressed across the library:

  1. All file header blocks should be removed:

/**

  1. Creating a mock instance usually throws an exception. Check the test files and see where the IDE suggests to Add PHPDoc comment with throws tags.
  2. Add return type hint void to your tests where missing.
  3. Any specific reason for using static assertion methods instead their objectual equivalent? For consistency, unless necessary, we should always use $this->asssert*
  4. If you are mocking objects in the setUp method, you should store them in a property with wider type hinting (by adding MockObject too) as you did with some tests, for example:
    private ContainerInterface|MockObject $container;
    because right now, when calling methods on the property that should hold the instance, the IDE complains that it could be undefined.
    Alternatively, you can create new instances with each test.
  5. Please add return type hints where missing (including untouched code in src)
  6. Please add tests for Laminas/View/HelperPluginManagerFactory

Comment thread .gitignore
Comment thread composer.json
Comment thread composer.json Outdated
Comment thread composer.json Outdated
Comment thread composer.json
Comment thread src/Extension/AuthorizationExtension.php Outdated
Comment thread src/Extension/DateExtension.php Outdated
Comment thread src/Extension/NavigationExtension.php
Comment thread src/Factory/AuthenticationExtensionFactory.php
Comment thread src/Factory/FlashMessengerExtensionFactory.php
Comment thread composer.json Outdated
@alexmerlin
Copy link
Copy Markdown
Member

Also, please update README.md file:

  • Add Symfony Insight and static analysis badges (see one of the recently updated libraries on how and where to add them)
  • In preparation for a 3.4.0 release, please replace on the line with PHP from Packagist the string 3.2.0 with 3.4.0
  • On the line with GitHub license please replace the string 3.2.0 with 3.0

@alexmerlin
Copy link
Copy Markdown
Member

Don't forget to add Gihub actions files as well.

@alexmerlin alexmerlin merged commit 8315d1e into 3.0 Jul 12, 2023
@alexmerlin alexmerlin deleted the issue-21 branch July 12, 2023 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

green badge use dot-* ( authorization) in composer. why important packages in require-dev ? and not in require ? Code quality

3 participants