Created by Sal Ferrarello / @salcode
(Skip to Resources)
"I Want a Set of Encyclopedias"
- 10 yr old me
Our repo doesn't need all the things,
just the things that are unique to this project
Our repo doesn't need all the things,
just the things that are unique to this project
Composer requires PHP 5.3
Things to do before using composer
On a Mac: copy-and-paste in Terminal
curl -sS https://getcomposer.org/installer | php;\
mv composer.phar /usr/local/bin/composer
(detailed Linux / Unix / OS X instructions)
On Windows: use within VVV or see these instructions
Pluralize Title Plugin
Before 3rd Party Code
$title .= 's';
packagist.org is the default composer repository
I found the package doctrine/inflector when
searching for "pluralize"
{
"require": {
"doctrine/inflector": "^1.0.0"
}
}
composer install
Historically, use "require" for each file
$loader = require 'vendor/autoload.php';
$title =
Doctrine\Common\Inflector\Inflector::pluralize($title);
Add composer third-party library
$loader = require 'vendor/autoload.php';
$title =
Doctrine\Common\Inflector\Inflector::pluralize($title);
{
"require": {
"doctrine/inflector": "^1.0.0"
}
}
ignore everything, whitelist what you need
{
"repositories":[
{
"type":"composer",
"url":"http://wpackagist.org"
}
],
"require": {
"wpackagist-plugin/wordpress-seo":">1.7.3"
}
}