Skip to content

Instantly share code, notes, and snippets.

"repositories": [
{
"type" : "git",
"name" : "me/myProject",
"version" : "dev-myFeatureBranch",
"url" : "[email protected]:me/myProject.git"
}
],
[bendihossan@arianrhod ~]$ sudo curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 135 100 135 0 0 251 0 --:--:-- --:--:-- --:--:-- 322
100 1549 100 1549 0 0 1487 0 0:00:01 0:00:01 --:--:-- 1487
\033[0;34mCloning Oh My Zsh...\033[0m
Cloning into '/home/bendihossan/.oh-my-zsh'...
remote: Counting objects: 4479, done.
remote: Compressing objects: 100% (1788/1788), done.
remote: Total 4479 (delta 2642), reused 4067 (delta 2432)
@Bendihossan
Bendihossan / gist:3879169
Created October 12, 2012 13:20
related content
/**
* @param ArrayCollection $related Related item
*/
public function setRelated(ArrayCollection $related)
{
$this->related = $related;
foreach ($related as $relation) {
if (! $relation->getRelated()->contains($this)) {
$relation->addRelation($this);
@Bendihossan
Bendihossan / composer.json
Created September 28, 2012 12:43
Specify Packages Manually in Composer
{
"repositories": [
{
"type": "package",
"package": {
"name" : "twitter/bootstrap",
"version" : "2.1.0",
"source" : {
"url" : "https://github.com/twitter/bootstrap.git",
"type" : "git",
<project name="your-project-name-goes-here" default="build">
<property name="dir.src" value="${basedir}/src/"/>
<target name="build" depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpunit,phpcb"/>
<target name="build-parallel" depends="prepare,lint,tools-parallel,phpunit,phpcb"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
<sequential>
<antcall target="pdepend"/>
<antcall target="phpmd-ci"/>
@Bendihossan
Bendihossan / gist:3635985
Created September 5, 2012 12:42
composer update --verbose output
Updating sensio/framework-extra-bundle dev-master (ade2d5 => 1281f6)
Checking out 1281f6218226ddb88df8546f28a3166e2a0cb55d
Pulling in changes:
1281f62 - Fabien Potencier: merged branch franmomu/patch-2 (PR #156)
5c3800d - Fran Moreno: [Doc] Add slash to DateTime class
@Bendihossan
Bendihossan / gist:3610275
Created September 3, 2012 16:00
Composer workflow with Git

Composer Workflow

Example of why composer.lock should be version controlled and workflow of how it can be used.

The reason we put ranges in composer.json is so that we can check for updates in our development environment and test our source code works with it BEFORE it goes into production.

The reason we have specific versions of vendors in composer.lock is so that we can version it and install the application into production environments with the versions we have tested while in development. Because of this we never run composer update on a production environment.

Creating an Application