Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

snoob/php-best-practices

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

php-best-practices

PHP

Symfony

Api Platform

WIP

Doctrine2

Coming in doctrine3

  • Final methods will be possible in Doctrine3

Sources

PHPUnit

  • Use PHPUnit Mocks instead of Prophecy https://medium.com/@IvanChepurnyi/native-mocking-and-stubbing-in-php-ad11a32596e4
  • Isolate your functionals tests thank to a group annotation (@group functional)
  • Never mock the class / trait / interface you are testing on its test class. For a trait or interface, use a DummObject which implements the interface or uses the trait
  • Don't test your privates methods unless they are complex

About

Best practices for PHP / Symfony / Api Platform / Doctrine 2 and PHPUnit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.