Composer fails update on a require from git repository where branch name starts with digit and has a period - json

I've forked the repository at https://github.com/laravel-doctrine/orm and I'm trying to add it as a require in a composer.json script.
My json (the relevant bits) is as follows:
"repositories": [
{
"type": "git",
"url": "https://github.com/MyGHAccount/laravel-doctrine.git"
},
.
.
.
"require": {
.
.
.
"laravel-doctrine/orm": "dev-1.2"
Composer generates the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package laravel-doctrine/orm could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting see
https://getcomposer.org/doc/04-schema.md#minimum-stability for more
details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for
further common problems.
The actual branch name from https://github.com/laravel-doctrine/orm is 1.2.
This SO question leads me to believe that Composer has no problem with periods in the branch name, but can't deal with branches starting with a digit.
I have found a workaround to this in that I simply renamed my branch on GitHub to master; I just want to know if there's a proper way to do this with Composer without the workaround.

Issue 1
This doesn't make sense: https://github.com/MyGHAccount/laravel-doctrine/orm.git.
In case you forked the original repository, the fork has another URL and not the one you posted here.
There are only two levels: github.com/vendor/repo.
It's possibly https://github.com/MyGHAccount/orm.git.
Issue 2
You're not using Composers verbose mode. Please use Composer's verbose mode (-vvv) and let Composer tell you the package resolution story and it's problems. You might be able to figure the issue out yourself.
Issue 3
Before - using packagist package:
composer.json:
{
"require": {
"laravel-doctrine/orm": "1.2"
}
}
After - overriding with your own fork:
composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/your-account/orm"
}
],
"require": {
"laravel-doctrine/orm": "1.2"
}
}

Related

artifactory flag artifacts as 'integration' not working so far

I am using artifactory to store my artifacts, using a generic repo (I named it 'generic-local') and a layout that I have customized based on the maven2 layout (I believe one of the default layouts)
unchanged layout
[orgPath]/[module]/baseRev/[module]-baseRev(-[classifier]).[ext]
my version are of the following format
myartifact-1.0.0
myartifact-1.0.0-develop
myartifact-1.0.0-branch1234
to detect and flag release artifact.. I understand artifactory relies on certain regex
the Folder Integration Revision RegExp and File Integration Revision RegExp
for both I have set this regexp to 'branch.*|develop.*'
I would expect artifactory to now flag as 'integration' any artifact following the two last artifacts in my list above but it isn't working so far..
http://myrepo.com/artifactory/api/search/versions?g=My.Applications&a=myartifact&repos=generic-local
returns
{
"results": [
{
"version": "1.0.267-branch1234",
"integration": false
},
{
"version": "1.0.266-branch1234",
"integration": false
},
{
"version": "1.0.265-branch1234",
"integration": false
}
}
I tested the Test Artifact Path Resolution form in artifactory .. for each artifacts above, it returned :
Folder Integration Revision: branch1234
File Integration Revision: branch1234
Which makes me think my regex is valid. thus the artifacts are seen as integration .. however the api returns false..
What am I doing wrong
The above is working. I can see artifacts finally flagged with the flag integration=true.
I can use this to, for example, run 'deploy latest stable version'.
The fix was to wait. Seems artifactory does not apply the rule right away. even for new artifacts added after the rule change. Confusing and wished their documentation would mentioned it.

BabelHelpers is not defined using Polymer

I'm using Polymer and its build process. The bundled files are generated throughmy polymer.json file.
I'm not explicitely using Babel, I've just seen it's used by "paper-autocomplete".
When going to the website, I have a js error stating the BabelHelpers is not defined.
When I use MAJ+F5, it works !
When I use F5, it doesn't work
(BabelHelpers is not defined)
When running it locally it works fine. When I deploy it to my server, I face this issue.
I'm running it as a standalone Java application as it has a Spring backend.
The website as multiple entry points, it works fine for all other ones.
The stacktrace :
Command :
polymer build --js-minify --css-minify --html-minify
The polymer.json file
{
"entrypoint": "pt.html",
"builds": [{
"bundle": true,
"js": {"compile": true, "minify": true},
"css": {"minify": true},
"html": {"minify": false},
"addServiceWorker": true
}],
"shell": "resources/elements-platform.html",
"fragments": [
"resources/html/lazy-resources.html",
"resources/html/ym-dashboard.html",
"resources/html/ym-partners.html",
"resources/html/ym-favorite.html",
"resources/html/ym-agenda.html",
"resources/html/ym-todos.html",
"resources/html/ym-profile.html",
"resources/html/ym-messages.html",
"resources/html/shop-list.html",
"resources/html/shop-detail.html"
],
"sources": [
"resources/src/**/*",
"resources/css/**/*",
"resources/data/**/*",
"resources/images/**/*",
"resources/img/**/*",
"resources/js/*",
"resources/js/cal/*",
"resources/js/countdown/*",
"resources/bower.json"
],
"extraDependencies": [
"resources/bower_components/webcomponentsjs/webcomponents-lite.min.js"
]
}
I run into the same issue few days ago after I updated Polymer-cli to newest version. But in my case my application throwed same error on local virtual host (with self-sign certificate). On production website it was fine.
Actually, babelHelpers are injected into file that is selected as entrypoint inside your polymer.json file. Maybe try to look there, if you have correct existing file.
there are few existing issues on github with this problem. Unfortunately there is no verified answer (Polymer team does not really care about github issues)
https://github.com/Polymer/polymer-cli/issues/787
https://github.com/Polymer/polymer-cli/issues/765
There is also same question on stackoverflow with answer:
polymer-cli - getting "Can’t find variable: babelHelpers" when I set compile to true
I too am seeing 'babelHelpers' is undefined. In my case it's coming from redux.js:
q='object'==('undefined'===typeof self?'undefined':babelHelpers
.typeof(self))&&self&&self.Object===Object&&self,r=p||q||
Function('return this')(),s=r.Symbol,t=Object.prototype,
Babel helpers is also raised as in Issue #606, which says that it's resolved and closed. But it or something similar is back.
I made a few changes, but I don't know which one solved the issue. The problem came from paper-autocomplete. When I stopped using it I didn't have the issue anymore.
I'm still using it, but I made several changes :
I made sure I was using the generated service-worker
I stopped using the version of JQuery that was in my bower (3.2.1) and used it from JQuery CDN (2.3.1) as I've seen it caused issues sometimes
Added manifest.json in the polymer.json file

Azure Functions: How do I control development/production/staging app settings?

I've just started experimenting with Azure functions and I'm trying to understand how to control the app settings depending on environment.
In dotnet core you could have appsettings.json, appsettings.development.json etc. And as you moved between different environments the config would change.
However from looking at Azure function documentation all I can find is that you can set up config in the azure portal but I can't see anything about setting up config in the solution?
So what is the best way to manage build environment?
Thanks in advance :-)
The best way, in my opinion, is using a proper build and release system, like VSTS.
What I've done in one of my solutions is creating an ARM template of my Function App and deploy this using a release pipeline with VSTS RM.
This way you can just add a value to the template.json, like the one from below.
"appSettings": [
// other entries
{
"name": "MyValue",
"value": "[parameters('myValue')]"
}
You will need another file, called parameters.json which will hold the values. This file looks like so (at the moment).
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {},
"storageName": {},
"location": {},
"subscriptionId": {}
}
}
Back in VSTS you can just change/override the values of these parameters in the portal.
By using such a workflow you will get a professional CI/CD implementation where no one has to bother themselves with the actual secrets. They are only known to the system administrators.

How do I get rid of composer-asset-plugin in yii2

Since the fxp\composer-asset-plugin broke last year, I am continuously experiencing problems installing yii2.
whenever I run a composer update command it fails due to this composer asset plugin. Everyday a new error pops up. I have read number of articles, github issues, with Sam and Alexander (maintainers of Yii Framework) continuously replying to the same problem then would close the topic. none of the updates to this plugin seem to be a fool-proof solution.
Now instead of asking how to solve the errors caused by this plugin (assuming that no one has a 100% working solution till date, only workarounds that work only 'sometimes'),
how do I get rid of this plugin and can't I manually install the packages through bower or npm?
In short, I mean,
In Yii 2.0, is life possible without this plugin, which has become a problem creator instead of solving problems.
You can use https://asset-packagist.org instead. Add this in composer.json:
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
Only problem is assets are installed in the different folder so you need to change the aliases. Add this in some common config file:
'aliases' => [
'#bower' => '#vendor/bower-asset',
'#npm' => '#vendor/npm-asset',
],

Contributors from package.json don't show up on npm web site

I've added contributors array in package.json but the list don't show up on project page https://www.npmjs.com/package/jquery.terminal
"author": {
"name": "Jakub Jankiewicz",
"email": "jcubic#onet.pl",
"url": "http://jcubic.pl/jakub-jankiewicz"
},
"contributors": [
{"name":"Johan","url":"https://github.com/johanjordaan"},
{"name":"Christopher John Ryan","email":"chrisjohnryan#live.com","url":"https://github.com/ChrisJohnRyan"},
{"name":"Zuo Qiyang","email":"zuoqy.gk#gmail.com","url":"http://zuoqy.com"},
{"name":"Sébastien Warin","url":"http://sebastien.warin.fr"},
{"name":"Florian Schäfer","email":"florian.schaefer+github#gmail.com","url":"https://github.com/fschaefer"},
{"name":"Tomasz Ducin","email":"tomasz#ducin.it","url":"http://ducin.it"},
{"name":"Hasan","url":"https://github.com/JuanPotato"},
{"name":"Hraban Luyat","email":"hraban#0brg.net","url":"https://luyat.com"},
{"name":"Mateusz Paprocki","email":"mattpap#gmail.com","url":"https://github.com/mattpap"},
{"name":"Martin v. Löwis","url":"https://github.com/loewis"},
{"name":"Robert Wikman","email":"rbw#vault13.org","url":"flatwired.com"},
{"name":"Steve Phillips","email":"steve#tryingtobeawesome.com","url":"https://tryingtobeawesome.com/"},
{"name":"coderaiser","email":"mnemonic.enemy#gmail.com","url":"http://coderaiser.github.io"},
{"name":"Juraj Vitko","url":"https://github.com/youurayy"},
{"name":"Yutong Luo","email":"yutong#yutongluo.com","url":"https://yutongluo.com"}
],
here is my package.json file
I've reported that on github but after two days with no response I decide to ask on SO.
I think you mean the "Collaborators" box on the right sidebar of the module page. They do sound similar but they are different things. NPM doesn't use the contributors field to populate that list, but you can add people to it manually or through the CLI.
I also had this problem. CLI command npm owner add didn't give me result. I found other way that works for me:
Go to 'Admin' tab on your package page and invite maintainer (simply type in npm user login you want to be collaborator).
Press button 'Update Package Settings' above 'Maintainers' block.
After these steps your package will have one more collaborator!