Skip to content

Commit 3b7f525

Browse files
author
Joe Wallace
committed
Changed bundle name
1 parent 1671147 commit 3b7f525

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ I can't take much credit at all for what's going on here. Pretty much all the cr
88

99
1. Install the bundle
1010

11-
php artisan bundle:install composer
11+
php artisan bundle:install composeur
1212

13-
1. Add composer to ```bundles.php```
13+
1. Add composeur to ```bundles.php```
1414

1515
return array(
16-
'composer' => array(
16+
'composeur' => array(
1717
'auto' => true,
1818
),
1919
);
2020

21-
1. Set up composer's "auto-update" capability ([Set up your database first](http://laravel.com/docs/database/config))
21+
1. Set up composeur's "auto-update" capability ([Set up your database first](http://laravel.com/docs/database/config))
2222

23-
php artisan composer::setup:auto_update
23+
php artisan composeur::setup:auto_update
2424

25-
1. Create ```application/config/composer.php```
25+
1. Create ```application/config/composeur.php```
2626

2727
return array(
2828
'auto_update' => true, /* <== You'll need that */
@@ -40,7 +40,7 @@ I can't take much credit at all for what's going on here. Pretty much all the cr
4040

4141
### A Partial Example
4242

43-
With this ```application/config/composer.php```
43+
With this ```application/config/composeur.php```
4444

4545
return array(
4646
'auto_update' => true,
@@ -64,21 +64,21 @@ Monolog will be available anywhere in your Laravel application, so you could say
6464

6565
1. Install the bundle
6666

67-
php artisan bundle:install composer
67+
php artisan bundle:install composeur
6868

69-
1. Add composer to ```bundles.php```
69+
1. Add composeur to ```bundles.php```
7070

7171
return array(
72-
'composer' => array(
72+
'composeur' => array(
7373
'auto' => true,
7474
),
7575
);
7676

77-
1. Set up composer's "auto-update" capability ([Set up your database first](http://laravel.com/docs/database/config))
77+
1. Set up composeur (installs Composer in the ```{base}``` dir)
7878

79-
php artisan composer::setup
79+
php artisan composeur::setup
8080

81-
1. Create ```application/config/composer.php``` (or don't, see below)
81+
1. Create ```application/config/composeur.php``` (or don't, see below)
8282

8383
return array(
8484
'auto_update' => false, /* <== This can be omitted */
@@ -88,22 +88,22 @@ Monolog will be available anywhere in your Laravel application, so you could say
8888
),
8989
);
9090

91-
1. Now use the composer bundle's Cli task
91+
1. Now use the composeur bundle's Cli task
9292

93-
php artisan composer::cli:install
93+
php artisan composeur::cli:install
9494

9595
or
9696

97-
php artisan composer::cli:update
97+
php artisan composeur::cli:update
9898

9999
etc...
100100

101101
##### Note: With ```auto_update``` set to false, you are responsible for installing and updating your Composer packages.
102102

103103
### More thoughts
104104

105-
It's not necessary to use the composer bundle's Cli task to run Composer. Running ```php artisan composer::setup``` installs composer.phar in the ```{base}``` directory, so from there you can simply run ```php composer.phar [command]```.
105+
It's not necessary to use the composeur bundle's Cli task to run Composer. Running ```php artisan composeur::setup``` installs composer.phar in the ```{base}``` directory, so from there you can simply run ```php composer.phar [command]```.
106106

107-
If you choose, you need not create ```application/config/composer.php```. As mentioned above, after the composer bundle is setup, you can use it from the ```{base}``` directory, so just create your own ```composer.json``` file there and get going. **Warning:** if you create your own ```composer.json``` and later create ```application/config/composer.php```, your ```composer.json``` might get eaten.
107+
If you choose, you need not create ```application/config/composeur.php```. As mentioned above, after the composeur bundle is setup, you can use it from the ```{base}``` directory, so just create your own ```composer.json``` file there and get going. **Warning:** if you create your own ```composer.json``` and later create ```application/config/composeur.php```, your ```composer.json``` might get eaten.
108108

109109
This bundle adds Composer's autoloader to PHP's collection of autoloaders. It's added after Laravel's, so Laravel should have the first shot at resolving classes and namespaces. I suppose this means there is *some* chance of namespaces being resolved by Laravel when you want them to be resolved by Composer, but I guess you can figure that out.

start.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
$config = Config::get('composer');
3+
$config = Config::get('composeur');
44

55
$my_bundle = Request::cli() && function()
66
{
77
foreach ($_SERVER['argv'] as $key => $val)
88
{
9-
if (strpos($val, 'composer::') === 0)
9+
if (strpos($val, 'composeur::') === 0)
1010
{
1111
return true;
1212
}
@@ -17,23 +17,23 @@
1717
if (! $my_bundle && isset($config['auto_update']) && $config['auto_update'])
1818
{
1919
require dirname(__FILE__) . '/tasks/setup.php';
20-
$cli = new Composer_Setup_Task;
20+
$cli = new Composeur_Setup_Task;
2121
if (! $cli->test())
2222
$cli->run();
2323
if (! $cli->has_lock())
2424
$cli->install(array());
2525

26-
$row = DB::table('composer_bundle')->first();
26+
$row = DB::table('composeur_bundle')->first();
2727
if (! $row || $row->version != md5(json_encode($config)))
2828
{
2929
$version = md5(json_encode($config));
3030

3131
$cli->update(array());
3232

3333
if (! $row)
34-
DB::table('composer_bundle')->insert(compact('version'));
34+
DB::table('composeur_bundle')->insert(compact('version'));
3535
else
36-
DB::table('composer_bundle')->update(compact('version'));
36+
DB::table('composeur_bundle')->update(compact('version'));
3737
}
3838

3939
ob_clean();

tasks/cli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
class Composer_Cli_Task
3+
class Composeur_Cli_Task
44
{
55
private $start_dir;
66
public function __construct()
@@ -59,7 +59,7 @@ protected function exec($cmd = '')
5959

6060
protected function writeConfig()
6161
{
62-
$config = Config::get('composer');
62+
$config = Config::get('composeur');
6363
if (! empty($config))
6464
{
6565
unset($config['auto_update']);

tasks/setup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'cli.php';
44

5-
class Composer_Setup_Task extends Composer_Cli_Task
5+
class Composeur_Setup_Task extends Composeur_Cli_Task
66
{
77
public function run($args = array())
88
{
@@ -14,7 +14,7 @@ public function run($args = array())
1414

1515
public function auto_update()
1616
{
17-
Schema::create('composer_bundle', function($table)
17+
Schema::create('composeur_bundle', function($table)
1818
{
1919
$table->string('version', 32);
2020
});

0 commit comments

Comments
 (0)