Midwest Dev Chat

MidwestDevChat.com github.com/skidvis/Midwest-Dev-Chat

  • The newest 15 messages in the super-cool #php channel.

  • 05/05 10:11:24 Savannah: @Tyrell I installed it via composer a while back and it works just fine for me in Sierra. What problems are you experiencing?

  • 05/05 11:30:08 Tyrell: yeah i tried the composer method and that didn't work either. i'm thinking i may have configured pear incorrectly

  • 05/05 11:30:17 Tyrell: first time using it

  • 05/05 11:42:25 Savannah: If your choice is between composer and pear, choose composer. Various packages are dumping pear in favor of composer. PHPUnit dropped their pear install in 2014.

  • 05/05 11:42:36 Savannah: What error messages are you getting?

  • 05/05 11:42:52 Tyrell: i thought i had it setup but it looks like i don't have `include_path` set in my php.ini file

  • 05/05 11:42:56 Tyrell: `PHP Warning: include_once(PHP/CodeSniffer/autoload.php): failed to open stream: No such file or directory in /usr/local/bin/phpcs on line 14`

  • 05/05 11:46:07 Savannah: If you have `include_once(PHP/CodeSniffer/autoload.php)` in your code, that is incorrect.

  • 05/05 11:49:56 Savannah: Since you are using phpcs in a global location, you might find it easier to install it and update it via homebrew. `brew install php-code-sniffer`

  • 05/05 11:51:28 Savannah: Usually, for things like phpcs & phpunit, I install specific versions in my project via the composer.json file’s “require-dev” section. Then I just use that tool in the command line for that project via `vendor/bin/phpcs` or `vendor/bin/phpunit`

  • 05/05 12:29:58 Tyrell: i'm working on a project that has `phpcs` as a gulp task, so without doing some updates on that i think i need to stick with the global command for now. also i don't yet have all of our projects switched over to composer...yet slightly_smiling_face

  • 05/05 12:30:23 Tyrell: learning a ton about local php config. looks like i was modifying the wrong php.ini file

  • 05/05 12:31:07 Tyrell: `include_path = "/usr/local/pear/share/pear"` in `/etc/php.ini` did the trick. thanks for the help @Savannah!

  • 05/05 13:04:22 Savannah: Woo! Good job, @Tyrell ! If you are in the KC area, check out the KC PHP UG (https://www.meetup.com/kcphpug/) and feel free to bring your questions. Cheers

  • 05/22 13:29:47 Savannah: A nice intro to Composer: https://www.sitepoint.com/re-introducing-composer/

  • *Usernames have been changed to protect the innocent.

Check out all the cool channels!

Join the conversation!