Adding ext-stackdriver_debugger to composer to enable StackDriver debugging in Google App Engine - google-app-engine

I'm following the steps on this page: https://cloud.google.com/debugger/docs/setup/php
I want to set up the debugging for App Engine flexible environment (PHP 7.2).
Step 3 says to add the Add the Stackdriver Debugger PHP extension via your composer.json file: with the following command:
composer require ext-stackdriver_debugger:*
However, when I run that, the package cannot be found:
[InvalidArgumentException]
Could not find a matching version of package ext-stackdriver_debugger. Check the
package spelling, your version constraint and that the package is available in a
stability which matches your minimum-stability (stable).
How can I complete Step 3 successfully?

Such error usually means that extension/module is not enabled in PHP version used by composer command. Make sure that you've enabled module in php.ini used by PHP CLI. Alternatively you may explicitly use specific PHP version to run composer command:
/usr/bin/php7.2 composer require ext-stackdriver_debugger:*
In worst case you may try to add extension manually to composer.json:
"require": {
"ext-stackdriver_debugger": "*",
...
},
and use --ignore-platform-reqs switch on composer update and composer install. Or just ignore this step - requiring PHP extension does not give you any real benefits except preventing installing package on server without this extension. You don't need to add PHP extension to composer.json to use it.

Related

Configuring Groovy on Jenkins

I'm using Jenkins ver 2.121.2. I'm trying to configure the Groovy plugin to run groovy scripts via a Jenkins job. The plugin documentation provided here
does not appear to match the UI I see in the System Configuration - Groovy section of this version of Jenkins. The various parameters don't match and so far I'm unable to get the plugin to run a simply groovy script. Not being familar with java and how the classpath works I'm not able to loosely interpret the instructions and get it working. If anyone can point me at documentation that more closely matches the Groovy plugin with the most current version of Jenkins I would appreciate it.
First, you need to configure an instance (or instances) of Groovy to run scripts in your builds. You do that on the Global Tool Configuration page.
You should have a least one JDK configured in the Global Tools Configuration (or have JAVA_HOME defined).
You can have Jenkins install the version of Groovy you want (on first use), or you can install Groovy yourself and point to it as in the example below:
Once this is in place, you can use the Execute Groovy Script build step in a build:

How to interpret suggestions when installing CakePHP via Composer?

When I try installing with command line:
composer self-update && composer create-project --prefer-dist cakephp/app my_app_name
I keep getting this message, which I didnt use to have, now which one is required, which one is not, do I have to download manually everytime?
cakephp/app suggests installing markstory/asset_compress (An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.)
cakephp/app suggests installing dereuromark/cakephp-ide-helper (After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.)
cakephp/app suggests installing phpunit/phpunit (Allows automated tests to be run without system-wide install.)
cakephp/cakephp suggests installing lib-ICU (The intl PHP library, to use Text::transliterate() or Text::slug())
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
symfony/console suggests installing psr/log-implementation (For using the console logger)
m1/env suggests installing m1/vars (For loading of configs)
asm89/twig-cache-extension suggests installing psr/cache-implementation (To make use of PSR-6 cache implementation via PsrCacheAdapter.)
aptoma/twig-markdown suggests installing michelf/php-markdown (Original Markdown engine with MarkdownExtra.)
aptoma/twig-markdown suggests installing knplabs/github-api (Needed for using GitHub's Markdown engine provided through their API.)
ajgl/breakpoint-twig-extension suggests installing ext-xdebug (The Xdebug extension is required for the breakpoint to work)
ajgl/breakpoint-twig-extension suggests installing symfony/framework-bundle (The framework bundle to integrate the extension into Symfony)
ajgl/breakpoint-twig-extension suggests installing symfony/twig-bundle (The twig bundle to integrate the extension into Symfony)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.)
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
These are only suggestions that may extend the functionality of already installed packages, but everything should work fine without them. For example monolog/monolog will suggest a couple of plugins that will allow logging into different backends. But monolog/monolog will work without them - you may not be able to log for example to Sentry, but monolog will still be usable without this feature.
So usually you can just ignore these suggestions. But you can take a few minutes to check what these suggested packages are actually doing - you can learn about new technologies and solutions that can make your app better and easier to maintain.
If you're really not interested in these suggestions, you can use --no-suggest switch to avoid displaying them on install/update/require:
composer install --no-suggest

Laravel Package - artisan vendor publish command not working

I'm new to Laravel, trying to install packages. I've tried many packages to include in my project like AdminLTE and Blogify. as the AdminLTE manual and Blogify manual says exactely.
Installed the packages using composer:
Composer require <package>
I've tried to publish the packages to use:
php artisan vendor:publish
or publish as said in the manuals, but the command gives me output:
Nothing to publish
and public folder doesn't change at all and no folders or files added.
How to integrate these packages into my Laravel 5.2 app in right way?
If possible can some one explain what is the problem and how to get over it and have ability to use it in my blades?
Note: I'm using Windows 10 and XAMP local server,I cant use commands like npm and any thing related to Mac
Step 1: composer require jeroennoten/laravel-adminlte
C:\wamp\blog>composer require jeroennoten/laravel-adminlte
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^1.6 for jeroennoten/laravel-adminlte
./composer.json has been updated
> php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing jeroennoten/laravel-adminlte (v1.6.5)
Downloading: 100%
Writing lock file
Generating autoload files
> php artisan optimize
Generating optimized class loader
Step 2:Add the service provider to the providers in config/app.php:
Step 3:php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets
C:\wamp\blog>php artisan vendor:publish --provider="JeroenNoten\LaravelAdminLte\ServiceProvider" --tag=assets
Copied Directory [\vendor\jeroennoten\laravel-adminlte\resources\assets] To [\public\vendor\adminlte]
Publishing complete for tag [assets]!

PyCharm unable to load NoseGAE

I've created a nose test config in PyCharm. I have NoseGAE installed in the virtualenv where I'm working. Running tests from the terminal with ./env/bin/nosetests --with-gae src/tests works great. The PyCharm test config, however, yields
/Users/bistenes/Code/myproject/env/bin/python /Applications/PyCharm.app/Contents/helpers/pycharm/noserunner.py src/tests/
Testing started at 6:31 PM ...
/Users/bistenes/Code/myproject/env/lib/python2.7/site-packages/nose/plugins/manager.py:395: RuntimeWarning: Unable to load plugin nosegae = nosegae:NoseGAE: nose>=0.10.1
RuntimeWarning)
Config is set to Nosetests, "All in folder" src/tests. The error happens whether or not --with-gae is passed as a param.
The ensuing failures are indicative of NoseGAE not being loaded:
AssertionError: No api proxy found for service "datastore_v3"
Make sure you have the latest pkg_resources by running pip install --upgrade setuptools. Then add the version of pkg_resources you want to be using to the front of your path. In PyCharm you can do this by adding an environment variable to the test configuration: PYTHONPATH=/path/to/site-packages:$PYTHONPATH.
This is happening because PyCharm, when support for Google App Engine is enabled (under "Languages & Frameworks"), inserts a bunch of GAE SDK directories to the front of the PYTHONPATH. The Python GAE SDK ships with setuptools-0.6c11, a version of setuptools from 2009. This has a very old version of pkg_resources bundled with it, which doesn't work with newer nose plugins.

How to add deployment message parameter with CloudBees Deployer plugin

Is there a way to give a custom message to the deployment with the Cloudbees Deployer plugin? We are used to putting the git version to the deployment so that it's easier to see which version we have running at run#cloud.
We've tried doing the deployment with the bees maven plugin and there it's possible to get the message parameter set from a build parameter. It just would be nice to be able to use the plugin instead of having to mess with the maven plugin, which is easier to get wrong in the configuration phase.
This feature was not available prior to version 4.4 of the CloudBees Deployer plugin.
Version 4.4 adds the ability to configure the description in the "Advanced" button:
The default value for this field is ${JOB_NAME} #${BUILD_NUMBER} so as to retain the previous behaviour.
The field supports all the usual Jenkins Environment token macro expansion, so you probably want to set it to something like ${GIT_COMMIT} or maybe ${GIT_COMMIT} ${JOB_NAME} #${BUILD_NUMBER}. In any case the standard token macros should provide the flexibility you require.
Note: If you are using DEV#cloud, and the Jenkins has a pre-4.4 version of the plugin you will have to wait until after 2013-04-15T15:00Z and restart your Jenkins instance to pick up the newer version of the plugin.
Note: If you are using the CloudBees Deployer plugin via the CloudBees Free Enterprise Plugins route, you will have to force the update center metadata to update or wait until after 2013-04-16T12:30Z to see the update in the list of plugins.

Resources