How can I check latest available version of Symfony with any API? - api

I want to get latest available version of Symfony Framework. Can I get it with any available API (maybe with Composer or any web services)?

The official Symfony roadmap API can give you the most recent LTS, Stable, and Beta versions available.
Making a call to
https://symfony.com/roadmap.json?version=all
Will return something similar to
{
"symfony_versions": {
"lts": "2.8.5",
"stable": "3.0.5",
"beta": "3.1.0-DEV"
},
"latest_stable_version": "3.0",
"version": "all",
"error_message": "Wrong version format (should be X.Y or X.Y.Z where X, Y, and Z are integers)."
}
Note that this is an undocumented use of the API, as you trick it by not supplying a valid version number. This prompts the API to return a JSON object listing the current versions. Although undocumented, I think you can safely use this because the Symfony project has a strong history of maintaining backwards compatibility.

packagist.org actually has an undocumented API. All you have to do is go to any package page and add .json to the URL.
For example, this is the page for symfony/symfony and its respective JSON formatted version.
The path "package"->"versions" is an object whose keys are version numbers and whose values are package description objects. These have a version_normalized key that you could use to sort the packages to find the latest version.
"package": {
"name": "symfony/symfony",
"description": "The Symfony PHP framework",
"time": "2011-09-29T17:29:54+00:00",
"maintainers": [
{
"name": "fabpot"
}
],
"versions": {
...
"v2.5.8": {
"name": "symfony/symfony",
"description": "The Symfony PHP framework",
"keywords": [
"framework"
],
"homepage": "http://symfony.com",
"version": "v2.5.8",
"version_normalized": "2.5.8.0",
...

Packagist is your friend (that's where the composer stuff comes from)
https://packagist.org
https://packagist.org/feeds/package.symfony/symfony.rss
https://packagist.org/feeds/package.symfony/symfony.atom
EDIT
2nd solution is via github API
https://github.com/symfony/symfony/releases
more infos at https://developer.github.com/v3/repos/#list-tags

Related

VScode: Kotlin plugin autocomplete not working

Today I first started programming with Kotlin in VScode. I installed the Kotlin plugin (which as I understood this plugin should provide autocomplete feature), but strangely when I start writing code, the autocompletion doesn't work.
This is in continuation of another problem I faced today with the above plugin that presented an error described here, that after taking the steps suggested here the error disappeared and it seems to be resolved.
But still when I write code I don't get autocompletion.
I also saw on the plugin page (in the Debugging §Setup section) the following instruction:
Open the launch.json file in your project and invoke code completion to create a new launch configuration (or select Add Configuration... in the debug tab)
I don't know if this is what should solve my problem, anyway, this is my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch kotlin script",
"type": "kotlin",
"projectRoot": "${workspaceFolder}",
"mainClass": "${workspaceFolder}/MainKt.main",
"request": "launch",
}
]
}
If there is a special configuration that needs to be set in launch.json, then I don't know what exactly needs to be there for it to work.

How do I set the $edgeAgents schema number on a Create Deployment

When I create an "IoT device configuration" for deployment to multiple edge devices I can see the deployment "Configuration Details" which look ok.
However when i actually go to make a deployment it appears to set the schema of the $edgeAgent to 1,0 not 1.0 (note the comma)
eg:
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {},
"runtime": {
"settings": {
"minDockerVersion": "v1.25"
},
"type": "docker"
},
"schemaVersion": "1,0",
on the documentation it says that the schemaVersion: Has to be "1.0"
https://learn.microsoft.com/en-us/azure/iot-edge/module-edgeagent-edgehub
When I deploy the device configuration it seems to continually come back with an IoTEdge status of
412 -- The deployment configuration schema version is invalid
I cant seem to find where I can change the property to be the correct value
Any ideas?
Sorry for the inconvenience caused, this is now fixed. Please continue/try creating New IoT Edge deployment from Azure portal-->IoT Hub and leave a comment here if you need further help on this matter. Thanks for your patience.

package.json specifying a version for a library

We have following requirements in our package.json,
"three-orbitcontrols": "^2.102.2"
in one computer, node_modules/three-orbigcontrols/package.json has
"_from": "three-orbitcontrols#2.102.2",
"_id": "three-orbitcontrols#2.102.2",
in another computer,
"_from": "three-orbitcontrols#2.102.2",
"_id": "three-orbitcontrols#2.110.1",
So specifying ^2.102.2 doesn't force the version (2.110.1 is installed`
What's the correct way of specifying specific 2.102.2 ?

error: no browser selected to run against, but i mentioned it in .testcafe.json

I have created .testcaferc.json, I mentioned the browser and src in it. so I should be able to run tests without putting this in the command line.
But it does not seem to be reading my config file from the project folder.
{
"src": "c:/Testcafe/Login.js",
"browsers": "firefox",
"reporter": {
"name": "html",
"output": "reports/report.html"
},
"takeScreenshotsOnFails": true,
"screenshotPath": "/screenshots/"
}
Actual:
Using locally installed version of TestCafe.
ERROR No browser selected to test against.
Type "testcafe -h" for help.
Expected:
I should not ask for browser and test file parameter as both are provided in config file.
The configuration file is a feature added in v1.0.0. If you upgrade from 0.20.5 to 1.0.0 or later, you will be able to use the configuration file for your tests.
Release Notes:
https://github.com/DevExpress/testcafe/releases/tag/v1.0.0

Can't create a migration with EF Core 1.1

I've spent two whole days trying to create an initial migration for the database of my project. This is so fustrating. Each preview version of the docs points towards different directions, and there're a lot of unclosed issues flying arround for a while.
My project is an AspNetCore application running on the full framework (net462) although I think I've tryed every combination of preview versions, even the workarounds proposed on this issue: EF Tools 1.1.0-preview4 Unrecognized option '--config' or in this one: https://github.com/aspnet/EntityFramework/issues/7083 but neither work.
This is an abstract of my project.json with the relevant parts:
{
"version": "1.0.0-*",
"buildOptions": {
"platform": "x86",
"debugType": "full",
"preserveCompilationContext": true,
"emitEntryPoint": true
},
"dependencies": {
....
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
....
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
},
"frameworks": {
"net462": {
}
},
...
}
In my case the proposed workarounds don't work, neither using the nightly builds nor downgrading the tools to 1.0.0-preview3.
If I use the 1.1.0-preview4-final version of the tools I hit this error:
Unrecognized option --config
If I use the nightly builds I get this one, wich is somehow absurd, as my app has only one project and is not a dll (it has also emitEntryPoint:true set)
Could not load assembly 'Sales'. Ensure it is referenced by the startup project 'Sales'
But this is my favourite one, when I downgrade to the 1.0.0-preview3-final of the tools I get this surrealistic one:
error: Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-preview3-final is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-preview3-final supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0)
I had to read it five times to get sure that in the second sentence was telling just the opposite of the first one... It seems a joke!
Furthermore, commands are not working on the PMC anymore, no matter wich version of the tools I install, no matter if I restore the packages and if I restart the computer...
I'm getting crazy with so many versions of everything and I only want to create a migration, it doesn't matter wich version of the tools I have to use... Is there a valid configuration nowadays or am I trying something imposible?
Has anybody been able to create migrations within an asp.net core application targeting the full .net framework (net462) with ANY version of the ef tooling?
If so, HOW?
EDIT:
After targeting the project to .netcoreapp1.0 and removing the incompatible references now I hit this error:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App\1.0.1'
What's happening here??? I'm really tired of .net Core, and it's still in it's first version. I've suffered a lot of issues like this while it was in beta, but now things are supposed to be stable... They have changed twenty times everything that can be changed, APIs, assembly names, namespaces, package names, conventions... Now let's wait for the preview5, 6 or 25 of the tooling and maybe by the year 2035 EF Core will have appropiate tools and procedures, meanwhile I damn a million time my decission of betting for this technology!
EDIT 2:
As per comments global.json may be relevant:
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
}
and to add that the 1.0.0-preview2-1-003177 folder exists and is the only one in C:\Program Files (x86)\dotnet\sdk\ and C:\Program Files\dotnet\sdk\
I hate to answer my own question, but I suppose that not too much people will go into this alley... So for those who are struggling with a similar problem I'll tell that mine came from this configuration on project.json:
...
"buildOptions": {
"platform": "x86", <- THIS!!!
"debugType": "portable",
"preserveCompilationContext": true,
"emitEntryPoint": true
},
after removing the "platform" key, migrations started to work again...
I'm not really sure when did I introduced that setting, since I didn't try to create migrations before upgrading to the version 1.1 of the .NET Core SDK. Maybe it was copied from one of the examples on internet, maybe it was from a previous version, I don't know, but that has turned me crazy for days, I hope it helps somebody outthere.