I'm trying to setup SonarQube 4.2 for a PHP/Symfony Project but when i want to configure quality profiles i only find "PHP> Sonar Way" Rules, with the old version (on the same server ) i have PHPCS & PHPMD rules & Zend Rules, did i miss something ?
I also want to add a custom rules files, in old versions it was in $SONAR_SRC/extensions/rules/ but it don't seems to work now.
When i check the PHPCS configuration with "phpcs- i" i have the following results : The installed coding standards are PHPCS, PSR2, PSR1, MySource, Zend, Squiz, PEAR and Symfony2
(I want to use Symfony2 profile)
This does not seem to be supported anymore, since PHP CodeSniffer has been dropped.
It seems that custom rules are first tested for Java, and if successful will be added for PHP profiles as well.
PSR-2/1 profiles are about to be added in the upcoming release though: http://jira.codehaus.org/browse/SONARPHP-293
See http://sonarqube.15.x6.nabble.com/How-to-add-code-sniffer-standards-rules-in-sonarQube4-2-using-sonar-php-plugin-version-2-1-td5024257.html for a conversation on this.
Related
I have an question regarding updates to the framework of a Laravel application.
Normally I run the composer update command to update all of its dependencies. For the laravel framework the package laravel/framework is used.
But they made some changes in this package which require you to make changes in the core application (not in composer). The core application is the package laravel/laravel.
For example, in this commit they have made a function called confirmPassword() which refers to a file ConfirmPasswordController.php in the package laravel/laravel.
But this file didn't exists on my application because my application is not up-to-date.
My question
How do i keep my core application up to date?
Errors
See a typical example of updating the dependencies but not the application here.
First of all... This is not an easy question and IMO there are MANY possible scenarios... Depending on the code you developed, the packages you're using, the version you want to use, and so on...
Anyway This is what I would do in this situation:
Let's say for example I want to upgrade from version X to version Z where Z is two major / minor releases ahead of X
Step 1
Follow the next steps for one major / minor realease at time. Once I've tried to upgrade an application from Laravel 5.4 to 5.6 and it was completely broken. So I decided to upgrade to 5.5 and test the everything was working and, in case, block at that release. Luckily when I've upgraded from 5.5 to 5.6 (after code fix) I've managed to make everything work as it should.
Step 2
Upgrade the core framework and the plugins, check for errors during the upgrade and ofc, check the official documentation for any kind of compatibility problem
Step 3
Laravel has it's own upgrade guide that should be followed step by step. A good chunk of errors can be solved simply following that guide. There may be some plugins that doesn't provide it but usually the problems are releated to new features... It's hard that a method, class or trait has completely changed from one version to another.
Step 4
This step can be omitted, but from the example you've provided maybe it's better to add it. When there is a new feature that requires a specific class or trait or whatsoever, the simplest way to check if the error is thrown because of a file missing (and that is part of the "boilerplate") or has a different nature, is to create an empty project with that specific version and make a comparison with the "default" files.
For example, if you made no changes to the LoginController, checking if the new version has any kind of updates, may be the solution.
You can do this manually, following the upgrade guide for the version you're upgrading from/to, for example this one.
Alternatively, Laravel Shift is a paid but fairly inexpensive tool that will do it for you automatically. Since it's making changes to your project, you should carefully review everything it's done.
im currently working on an update from laravel 4.1.24 to 5.6 The problem is i got nearly no experience with laravel. My question is now, how do i properly upgrade. Should i first upgrade to 4.2 and then to 5.0 and so on or would it be better to upgrade directly to 5.6 and how should i do this? I mean there are so many changes that i think i could miss something.
Also the project is just in a github repository, so it's hard to check if it's still working after an upgrade because i dont got the old modules. Or would it be enough to go on laravelshift. com and just upload it there to go from 4.1 to 4.2, 4.2 to 5.0 and so on.
Best regards!
The Laravel documentation contains a whole list of breaking changes that can help you to upgrade your application to a newer version. Laravel Shift is a service that checks and updates these changes in your project.
However, there is no way of being sure that your project will still work after these upgrades. Especially if you are using external modules its very risky.
If it is not required, I would not recommend upgrading from 4.1.x to 5.6 unless you have a lot of time on your hands. A solution could be to set up a completely new 5.6 project and add the project code file by file and test the implementations.
Start from here and follow instructions to upgrade it to 4.2. Then go through your packages and update their versions accordingly. When done use dropdown list in the top-right corner to select next version (5.0) and repeat it until you are at 5.6.
You definitely need to be able to run your code and test it somehow after each step because there will be problems. From 4.1 to 5.6 is a big leap and a lot of packages might have breaking changes etc. I only migrated as far as from 5.1 to 5.6 and it took me whole day to fix everything.
As for automated upgrade you can try it as well, but as I already mentioned you need to be able to test your work because all packages need to be updated as well.
I am using netbeans 8.0 it shows auto-complete for zend framework but not for codeigniter. How can I use it with codeigniter for auto-complete support???
Thanks
Copy the code in the answer here: Netbeans code completion for CodeIgniter
into a php file in your project.
I used CI_Autocomplete2.0.php in the root of the project. It's a hack, but it does work. Since I'm familiarizing myself with CI's syntax & naming conventions it does what I want.
I successfully installed one of the Kenai 7.3 modules in 7.4, but the other one they show on the webpage wasn't listed in the plugin options, so I uninstalled it and now I can't get it to re-install again. I haven't tried it in my NetBeans 8 yet though.
Edit: Sorry, I just figured out that the Kenai modules were both listed. The "PHP CI Framework Repository" installed ok (don't know what, if anything, it did yet). It's the "PHP CI Framework" that won't install and lists out a bunch of module dependencies. I'll update again if there's anything to add when I try with Nb8.
You can do this using Project Kenai. Hope that's what you're looking for.
use sublime text editor 2 or 3 and install CI:snippets you will get dropdown for the codeigniter or check this link
http://ellislab.com/forums/viewthread/184716/
I'm trying to test my liferay-theme with liferay EE 6.1.20. This theme worked on my current liferay instalation. I can deploy my Theme without any errors on liferay EE 1.2.0 server. Than if go to control panel and try to switch the current theme to my theme - nothing happens and I see only liferay default theme on my page. I don't found any errors in the server log - I can't post any logs or errors hier, because I have no output with errors...
Can anybody help ?
I wouldn't expect too many differences between the two. However, the easiest way to make sure a theme can be deployed correctly is to use the matching SDK (e.g. 6.1.20), copy your _diffs folder to that one and compile the theme.
Make sure that Liferay's deployment descriptor /WEB-INF/liferay-plugin-package.properties specifically states that the theme is compatible with your version, otherwise Liferay might assume that it's not - this wouldn't be a technical but a configurational problem.
Also check liferay-look-and-feel.xml - there might be a compatibility field in there as well, I don't know which one takes precedence.
This setting is there because themes are built as a difference to a default theme that is built in to Liferay - and you basically state here which versions you have checked this theme to actually work with. You can specify any number of versions, as well as some wildcards (e.g. 6.1.20+)
Just a quick question involving upgrading Magento. I currently have version 1.4.1 and would like to update to the newest version. I tried upgrading through the Magento Connect and can not get that to work. And my host will not give me SSH access so I can't do it that way.
It's very frusterating, what are my other options? Can I just download the new set of files and replace those, but keep the old database? Will that work?
Not sure the best way to approach this. Thank you.
search SO to get similar answers:
disable all 3rd party extensions
disable custom themes
upgrade (you can do version by version also)
turn on your theme
turn on extensions one by one and debug