composer ã§ä¾åé¢ä¿ããç¹å®ã®ã©ã¤ãã©ãªãé¤å¤ãã
Maven ã§ã®ãã
<dependencies> <dependency> <groupId>sample.ProjectA</groupId> <artifactId>Project-A</artifactId> <version>1.0</version> <scope>compile</scope> <exclusions> <exclusion> <!-- declare the exclusion here --> <groupId>sample.ProjectB</groupId> <artifactId>Project-B</artifactId> </exclusion> </exclusions> </dependency> </dependencies>
composer ã«ã¯ãã®ä¾åé¢ä¿ããç¹å®ã®ã©ã¤ãã©ãªãé¤å¤ããæ©è½ã¯ãªããã¾ã å®è£ ãã¦ããªãã®ã§ã¯ãªãæ¹éã¨ãã¦å ¥ããã¤ããã¯ãªããããcomposer éçºè ã¯ãã®æ©è½ãä¸è¦ã¨æã£ã¦ããã£ã½ãã
Exclude packages · Issue #1549 · composer/composer
çæ³ãããã¨å¾®å¦ãªã¨ããã ãã©ãå®éããããåé¡ã¯ããèµ·ããããã«ãã¼ããã¹ããããªãããªãcomposer éçºè ã¯ããããçµé¨ãªãã®ã ããããPHP ã¯ãã«ã¹ã¿ãã¯ã§ããã®ã¿ã§å®çµãããããªãã¬ã¼ã ã¯ã¼ã¯ãå¤ããä¾åé¢ä¿ã®ããªã¼ãæ·±ããªããªããã dependency hell ãèµ·ãã¥ããã¨åæã«ç解ãã¦ããã
ä¸å¿ãåé¡èªä½ã¯é¤å¤ãããã¢ã¸ã¥ã¼ã«ã provide ã«æå®ããã°è§£æ±ºããããã§ã«æä¾ããã¦ããã®ã ãã composer ã§æã£ã¦ããå¿ è¦ã¯ãªããããã¨ãããã¨ã
{ "require": { "foo": "1.0.0" }, "provide": { "bar": "*" } }
ãã ããããã ã¨åé¡ã¯è§£æ±ºãããã®ã®æå³ã¨ãã¦ã¯å ¨ãéãããæ°æã¡æªããè¨å®ã json ã ããã³ã¡ã³ããæ¸ããªãã
ã¾ã¨ã
- composer 㧠exclude ãããã¨ã㯠provide ã使ã
- json ã§è¨å®ãã¡ã¤ã«ã¯ãã³ãã