Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Symfony2][SF2][SF] Własny bundle wymagający innych bundles
Forum PHP.pl > Forum > PHP > Frameworki
Fluke
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
skowron-line
A jest ten bundel na https://packagist.org/ questionmark.gif
Fluke
Nie, ale dodaję:
  1. "repositories": [
  2. {
  3. "type": "vcs",
  4. "url": "https://github.com/my/xhtml"
  5. }
  6. ]


To nie wystarczy ?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.