![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 623 Pomógł: 79 Dołączył: 16.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Hej,
Dzisiaj próbowałem zapytać na stacku, powiedzieli, że to nie jest pytanie programistyczne. Na forum Yii nie ma odpowiedzi. A pytanie jest chyba proste - chcę na żywo zobaczyć zalety używania composera. Frameworki Yii oraz Laravel mocno tego używają. Mam je oba zainstalowane, teraz chcę poczuć tę MOC composera i zainstalować coś zewnętrznego w parę sekund. Tylko nie wiem co. Pochodzę ze świata Codeignitera, czyli jestem stary. Z tego co czytałem, największe zalety Yii/Laravel to namespacy zgodne z jakimś tam nowym standardem php PCRE-coś tam. Najchętniej bym zainstalował nowy moduł, posiadający controller/model/views. I wtedy chciałbym zobaczyć jak wygląda composer.json Jeśli moje pytanie jest totalnie głupie, to naprowadźcie mnie proszę. Edit: oczywiście chodziło mi o PSR-4 a nie o PCRE-coś tam:) Ten post edytował konrados 18.03.2015, 15:38:58 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 6 072 Pomógł: 861 Dołączył: 10.12.2003 Skąd: Dąbrowa Górnicza ![]() |
Weź pierwszy lepszy dodatek z GitHuba, wykonać komendę instalacyjną i zobacz co się stanie.
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Najpierw dowiedz się co to composer, potem PCRE-cośtam, potem dowiedz się do czego się używa composer. Potem możesz wejść w jeden z linków z paczkami dla Laravala w moim podpisie, wybrać coś i zainstalować
|
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 623 Pomógł: 79 Dołączył: 16.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Najpierw dowiedz się co to composer, potem PCRE-cośtam, potem dowiedz się do czego się używa composer. Potem możesz wejść w jeden z linków z paczkami dla Laravala w moim podpisie, wybrać coś i zainstalować Dzięki. Wcześniej mniej więcej poczytałem co to jest, ale nie potrafię tego poczuć na swojej skórze, bo nie mogę niczego do instalacji znaleźć. Z Twoich paczek wybrałem "Entrust" - instalacja nie powiodła się, Błąd: - don't install illuminate/validation v4.1.0|don't install laravel/framework v5.0.14 Znaczy się, pewnie dodatek dla Laravel 4.x a ja mam 5.x No i nic się nie dowiedziałem:( Powiedz mi jak szukać, bo wpisanie Laravel Modules prowadzi do poradników jak tworzyć strukturę modułową dla Laravela. Nie szukam niczego konkretnego, ale coś co zadziała. @phpion Cytat Weź pierwszy lepszy dodatek z GitHuba, wykonać komendę instalacyjną i zobacz co się stanie. To by było proste, gdybym chciał coś konkretnego, ale mi chodzi o cokolwiek, prostego, nie wiem jak to znaleźć. Ten post edytował konrados 18.03.2015, 15:24:31 |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 321 Pomógł: 55 Dołączył: 19.04.2009 Ostrzeżenie: (0%) ![]() ![]() |
chyba tego szukasz https://packagist.org/
|
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Tak, domyślna instalacja Entrust opiera się o branch master (dla L4)
https://github.com/Zizaco/entrust/tree/laravel-5 tu masz instalację dla L5 Możesz zainstalować sobie wpierw Debugbar, proste i szybkie. |
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 623 Pomógł: 79 Dołączył: 16.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Tak, domyślna instalacja Entrust opiera się o branch master (dla L4) https://github.com/Zizaco/entrust/tree/laravel-5 tu masz instalację dla L5 Możesz zainstalować sobie wpierw Debugbar, proste i szybkie. Composer mnie chyba nie lubi, zrobiłem zgonie z insrukcją (instalacja "zizaco/entrust"), tj. mój composer.json wygląda tak: Kod { "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "laravel/framework": "5.0.*" }, "require-dev": { "phpunit/phpunit": "~4.0", "phpspec/phpspec": "~2.1" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php" ] }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php -r \"copy('.env.example', '.env');\"", "php artisan key:generate" ] }, "config": { "preferred-install": "dist" }, "zizaco/entrust": "dev-laravel-5" } Po wykonaniu "composer update" mam w consoli: Kod - Removing symfony/routing (v2.6.4) - Installing symfony/routing (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 95% Downloading: 100% - Removing symfony/process (v2.6.4) - Installing symfony/process (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 20% Downloading: 25% Downloading: 45% Downloading: 65% Downloading: 70% Downloading: 90% Downloading: 100% - Removing symfony/http-foundation (v2.6.4) - Installing symfony/http-foundation (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 65% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing symfony/event-dispatcher (v2.6.4) - Installing symfony/event-dispatcher (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 100% - Removing symfony/debug (v2.6.4) - Installing symfony/debug (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 25% Downloading: 30% Downloading: 55% Downloading: 60% Downloading: 85% Downloading: 90% Downloading: 100% - Removing symfony/http-kernel (v2.6.4) - Installing symfony/http-kernel (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 65% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing symfony/finder (v2.6.4) - Installing symfony/finder (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 55% Downloading: 60% Downloading: 65% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% - Removing symfony/console (v2.6.4) - Installing symfony/console (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 65% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing swiftmailer/swiftmailer (v5.3.1) - Installing swiftmailer/swiftmailer (v5.4.0) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing psy/psysh (v0.4.1) - Installing psy/psysh (v0.4.3) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 50% Downloading: 55% Downloading: 60% Downloading: 65% Downloading: 70% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing nesbot/carbon (1.16.0) - Installing nesbot/carbon (1.17.0) Loading from cache - Removing monolog/monolog (1.13.0) - Installing monolog/monolog (1.13.1) Loading from cache - Removing league/flysystem (1.0.1) - Installing league/flysystem (1.0.2) Downloading: connection... Downloading: 0% Downloading: 20% Downloading: 25% Downloading: 45% Downloading: 65% Downloading: 70% Downloading: 90% Downloading: 100% - Removing jeremeamia/superclosure (2.0.0) - Installing jeremeamia/superclosure (2.1.0) Downloading: connection... Downloading: 0% Downloading: 40% Downloading: 80% Downloading: 95% Downloading: 100% - Removing symfony/filesystem (v2.6.4) - Installing symfony/filesystem (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 15% Downloading: 95% Downloading: 100% - Removing laravel/framework (v5.0.14) - Installing laravel/framework (v5.0.17) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 20% Downloading: 25% Downloading: 30% Downloading: 35% Downloading: 40% Downloading: 45% Downloading: 55% Downloading: 65% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% Downloading: 100% - Removing symfony/yaml (v2.6.4) - Installing symfony/yaml (v2.6.5) Downloading: connection... Downloading: 0% Downloading: 5% Downloading: 10% Downloading: 15% Downloading: 75% Downloading: 80% Downloading: 85% Downloading: 90% Downloading: 95% Downloading: 100% writing lock file generating autoload files generating optimized class loader Nie widzę, by coś w rodzaju "zizaco/entrust" się dodało, plus, nie ma czegoś takiego w katalogu "vendor". |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 1 798 Pomógł: 307 Dołączył: 13.05.2009 Skąd: Gubin/Wrocław Ostrzeżenie: (0%) ![]() ![]() |
A w jaki sposób instalujesz tego zizaco/entrust bo w pliku composer.json go nie ma w sekcji require, jest tam tylko laravel. Na jakim systemie pracujesz ? Miałeś kiedyś doczynienia z jakimś menadżerem pakietów? Obstawiam że głównie używasz windowsa, a unixy znasz z nazwy oraz z tego że istnieją..
|
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Bo masz dodać wpis do sekcji require lub require-dev.
Mówiłem poczytaj wpierw o composer to mnie nie słuchałeś ;> |
|
|
![]()
Post
#10
|
|
Grupa: Zarejestrowani Postów: 623 Pomógł: 79 Dołączył: 16.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Bo masz dodać wpis do sekcji require lub require-dev. Mówiłem poczytaj wpierw o composer to mnie nie słuchałeś ;> Dzięki, teraz poszło:) A propo's czytania o composer, znalazłem to: http://code.tutsplus.com/tutorials/easy-pa...oser--net-25530 Mam nadzieję, że to na razie wystarczy:) Bo ja tylko tak ogólnie chciałem poznać composera. Dopiero jak zrozumiem jego zalety to chciałbym wdrożyć się bardziej. Ogólnie dziękuję wszystkim, @Pyton_000 @by_ikar @ctom Ten post edytował konrados 18.03.2015, 18:57:00 |
|
|
![]()
Post
#11
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Ważne jest to żeby na wersji produkcyjnej serwisu nigdy nie odpalać 'composer update' co może spowodować katastrofalne skutki.
Poczytaj o różnicach pomiędzy composer install a update bo są dość istotne. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 26.09.2025 - 06:32 |