Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony2][SF2][SF] Własny bundle wymagający innych bundles
Fluke
post
Post #1





Grupa: Zarejestrowani
Postów: 247
Pomógł: 9
Dołączył: 20.09.2010
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Witam,

Mam bundla: MyDataGridBundle i w nim composer.json:
  1. {
  2. "name": "my/datagrid-bundle",
  3. "type": "symfony-bundle",
  4. "description": "This bundle provide build data grids",
  5. "keywords": ["util"],
  6. "license": ["MIT"],
  7. "authors": [{
  8. "name": "",
  9. "email": ""
  10. }],
  11. "require": {
  12. "symfony/framework-bundle": "~2.0",
  13. "my/xhtml-bundle": "dev-master"
  14. },
  15. "repositories": [
  16. {
  17. "type": "vcs",
  18. "url": "https://github.com/my/xhtml"
  19. }
  20. ],
  21. "autoload": {
  22. "psr-0": {"My\\Bundle\\DataGridBundle": ""}
  23. },
  24. "target-dir": "My/Bundle/DataGridBundle",
  25. "extra": {
  26. "branch-alias": {
  27. "dev-master": "1.0-dev"
  28. }
  29. }
  30. }


Oraz wymagaby bundle z plikiem composer.json:
  1. {
  2. "name": "my/xhtml-bundle",
  3. "description": "This bundle provide xhtml builder",
  4. "keywords": ["util"],
  5. "type": "symfony-bundle",
  6. "license": ["MIT"],
  7. "authors": [{
  8. "name": "",
  9. "email": ""
  10. }],
  11. "require": {
  12. "symfony/framework-bundle": "~2.0"
  13. },
  14. "autoload": {
  15. "psr-0": {
  16. "My\\Bundle\\XhtmlBundle": ""
  17. }
  18. },
  19. "target-dir": "My/Bundle/XhtmlBundle",
  20. "extra": {
  21. "branch-alias": {
  22. "dev-master": "1.0-dev"
  23. }
  24. }
  25. }


I teraz w swoim projekcie który piszę pod Symfony2 w pliku composer.json chcę dodać:
  1. ...
  2. "required": {
  3. "my/datagrid-bundle": "dev-master",
  4.  
  5. "repositories": [
  6. {
  7. "type": "vcs",
  8. "url": "https://github.com/my/datagrid"
  9. }
  10. ]
  11. }


Niestety dostaję coś takiego:
  1. Problem 1
  2. - my/datagrid-bundle dev-master requires my/xhtml-bundle dev-master -> no matching package found.
  3. - my/datagrid-bundle dev-master requires my/xhtml-bundle dev-master -> no matching package found.
  4. - Installation request for my/datagrid-bundle dev-master -> satisfiable by my/datagrid-bundle[dev-master].


Jak w pliku MyDataGridBundle usunę linijkę z required (my/xhtml-bundle) to jest ok.
Jak zrobić, żeby w bundlu można było dociągać potrzebne zależności ?

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
skowron-line
post
Post #2





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

Ostrzeżenie: (0%)
-----


A jest ten bundel na https://packagist.org/ (IMG:style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
Fluke
post
Post #3





Grupa: Zarejestrowani
Postów: 247
Pomógł: 9
Dołączył: 20.09.2010
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Nie, ale dodaję:
  1. "repositories": [
  2. {
  3. "type": "vcs",
  4. "url": "https://github.com/my/xhtml"
  5. }
  6. ]


To nie wystarczy ?
Go to the top of the page
+Quote Post
tabbi
post
Post #4





Grupa: Zarejestrowani
Postów: 150
Pomógł: 3
Dołączył: 30.10.2010

Ostrzeżenie: (0%)
-----


https://github.com/composer/composer/issues/1478
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 18.09.2025 - 19:27