{ PHP snippets }

Paul Redmond ๐Ÿ‡บ๐Ÿ‡ธ

Paul Redmond ๐Ÿ‡บ๐Ÿ‡ธ @paulredmond

๐Ÿ”ฅ If you work with PHP composer all day, consider adding ./vendor/bin to your path to save those precious keystrokes โŒจ๏ธ https://t.co/J6V1ZLxSYZ

PHP
Walkabout JMac

Walkabout JMac @gonedark

โš—๏ธ Need to control a defined constant in your tests? You can use the <const> element in your phpunit.xml file to define a dummy value your code will use when the tests run. https://t.co/cMMpWOJBzt

PHP
Barry vd. Heuvel

Barry vd. Heuvel @barryvdh

Quick reminder: you can run `composer outdated` to get a quick overview of available updates. Red: can be updated with current constraints. Yellow: Update available that doesn't match your current requirements. https://t.co/DpyAHgUMIb

PHP
Jason McCreary

Jason McCreary @gonedark

โš—๏ธ Whenever I generate test data, I like to explicitly set values which could change behavior, even if they are currently defaulted with the same value. The future brings change and resolving such a failure can be hard. https://t.co/d030JfKbJO

ModestasV

ModestasV @ModestasMV

TIP: You want to export #laravel eloquent query to native mysql? Here's a quick way to do it: https://t.co/ORGfKtEHNY - Gives out everything you need to run it in mysql console * Warning, doesn't go friendly with relationships and so on. Works on single queries

Jason McCreary

Jason McCreary @gonedark

Came across a quick way to fake a single requirement so Composer can install a dependency instead of using the heavy handed `--ignore-platform-reqs`. https://t.co/LYsHRmTJon

PHP
Stefan Bauer

Stefan Bauer @stefanbauerme

๐ŸŒŸ Here is another great #Tip for Composer: If you don't want to scroll through all the installation conflicts when doing a `composer update`, did you know you can ask composer why a specific package can not be installed? Just use `composer why-not <package> <version>`? https://t.co/RCZs4x34eu

PHP

Did you know you may also pass `null` as a function typed parameter value in #PHP, even though the type is not marked nullable with `?` All parameters with a default value of `null` may receive `null` as a value. https://t.co/mdbqXprZag

PHP