Comments (7)
With the Github driver, the redirection does not work, because the driver uses the API v3 of Github.com.
An automatic redirection exists for navigation with the browser or using GIT (https://github.com/blog/1508-repository-redirects-are-here), but they does not work with the API.
I contacted the support of Github.com, and am awaiting a response.
However the issue Github API returns 404, but default http request returns 301 on Stackoverflow, tells me that it's not going to be fixed quickly (+6 months).
from composer-asset-plugin.
To summarize the response of support: use the solution described in the question Github API returns 404, but default http request returns 301.
from composer-asset-plugin.
Looks like this is a general problem of composer then too, right? So when renaming repos, the original author has to take care about renaming the repo Urls in the bower repo. I'd suggest to report this problem to the library authors instead of building unreliable workarounds or waiting for github to change it.
from composer-asset-plugin.
@cebe The subject is very interesting, and I just spent a good part of the afternoon talking to guys of support of Github. The problem with redirects of Github, it's that they are only available for the classic HTTP access and GIT, but that the API does not have this capability.
For the support of Github, it is true that this impossibility is problematic, but it's not tomorrow that the APIs will have the automatic redirects, and they advised me to take this analysis directly into my tool.
Given that the redirects work for GIT and classic HTTP access, the owner of the repository does not feel compelled to change the URL in the dependency manager, because it is still functional (for example, I created an issue for hammerjs, and my issue went unanswered for several months, and the URL has not changed).
I made a prototype for the fallback directly into Composer for Github driver (given that this is an issue of service Github). The prototype is functional for the public repositories, but not for the private repositories (because of the inability to authenticate with the token on github.com, and this is confirmed by the support). The support must yet to get back to me, for to suggest me an alternative way to find the new URL for the private repositories, but at first glance, it's not possible. It is true that it is only the public repositories that pose a problem.
However, for them, the principle of my implementation is the more appropriate.
from composer-asset-plugin.
@cebe I asked to the support if I could get the new URLs using raw.github.com, and the response is simple: it's not possible. But on the other hand, the content is recoverable with the old or the new URL, and this is compatible with private repositories (I have not still tested).
In this case, we just have to change the URL api.github.com to raw.github.com.
from composer-asset-plugin.
@cebe But ultimately, it's not possible to use raw.github.com, because we need get the list of tags and branchs. It remains that the first solution: usable only with public repositories (and it is them that pose problem).
from composer-asset-plugin.
Fixed by b9fb567.
from composer-asset-plugin.
Related Issues (20)
- Asset dependencies not installing from composer.json when no lock file present HOT 6
- git skip update does not work for some repos
- Option to skip update? HOT 2
- Error requiring jquery. HOT 3
- Composer don't install completely all dependencies HOT 5
- Problems installing NPM-assets HOT 16
- Silent removal of dependency during update since Composer 1.6.4 HOT 2
- Request to herokuapp depricated HOT 2
- Composer uses semver. HOT 3
- No valid bower.json was found in any branch or tag of https://github.com/yiisoft/jquery-pjax.git HOT 5
- Composer 1.9.0: "No valid bower.json was found" when referencing a branch of a cloned repository HOT 8
- Compatibility with Composer 2.0 HOT 8
- Compatibility with Composer 2.0 HOT 25
- [npm] fatal: Unable to find remote helper for 'git+https' HOT 3
- request support for composer 2.0 and php8 HOT 2
- composer require npm-asset/xterm-addon-fit fails HOT 1
- PHP8 issue
- Package fxp/composer-asset-plugin at version ~1.3 has a PHP requirement incompatible HOT 2
- Package fxp/composer-asset-plugin has a PHP requirement incompatible with your PHP version HOT 1
- composer global require "fxp/composer-asset-plugin:dev-master" fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from composer-asset-plugin.