Is it normal that zendframework/zend-http package requires 49 components? - package

Here's the composer.json:
{
"repositories": [
{
"type": "composer",
"url": "https://packages.zendframework.com/"
}
],
"require": {
"zendframework/zend-http": "2.*"
}
}
... and the exhaustive list:
Authentication Code Db Escaper Filter InputFilter Log Mime Paginator Server Stdlib Uri XmlRpc
Barcode Config Debug EventManager Form Json Mail ModuleManager Permissions ServiceManager Tag Validator
Cache Console Di Feed Http Ldap Math Mvc ProgressBar Session Test Version
Captcha Crypt Dom File I18n Loader Memory Navigation Serializer Soap Text View
Some of them actually make sense. But what about Barcode,Captcha,Navigation or even Dbfor instance?
Edit
$ rm -rf vendor
$ rm -rf ~/.composer/
$ rm composer.lock
$ more composer.json
{
"require": {
"zendframework/zend-http": "2.*"
}
}
$ composer self-update
You are using the latest composer version.
$ composer install
Loading composer repositories with package information
Installing dependencies
- Installing zendframework/zendframework (2.1.3)
Downloading: 100%
zendframework/zendframework suggests installing doctrine/common (Doctrine\Common >=2.1 for annotation features)
zendframework/zendframework suggests installing ext-intl (ext/intl for i18n features)
zendframework/zendframework suggests installing pecl-weakref (Implementation of weak references for Zend\Stdlib\CallbackHandler)
zendframework/zendframework suggests installing zendframework/zendpdf (ZendPdf for creating PDF representations of barcodes)
zendframework/zendframework suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha for rendering ReCaptchas in Zend\Captcha and/or Zend\Form)
Writing lock file
Generating autoload files
PS: pleased that some consider my question as simply good to be closed ... I really thank the others for having tryed to answer.

It doesn't.
Using that composer.json file, I get this:
$ composer.phar install
Loading composer repositories with package information
Installing dependencies
- Installing zendframework/zend-stdlib (2.1.3)
Downloading: 100%
- Installing zendframework/zend-servicemanager (2.1.3)
Downloading: 100%
- Installing zendframework/zend-filter (2.1.3)
Downloading: 100%
- Installing zendframework/zend-i18n (2.1.3)
Downloading: 100%
- Installing zendframework/zend-validator (2.1.3)
Downloading: 100%
- Installing zendframework/zend-escaper (2.1.3)
Downloading: 100%
- Installing zendframework/zend-uri (2.1.3)
Downloading: 100%
- Installing zendframework/zend-loader (2.1.3)
Downloading: 100%
- Installing zendframework/zend-http (2.1.3)
Downloading: 100%
zendframework/zend-stdlib suggests installing pecl-weakref (Implementation of weak references for Stdlib\CallbackHandler)
zendframework/zend-servicemanager suggests installing zendframework/zend-di (Zend\Di component)
zendframework/zend-filter suggests installing zendframework/zend-crypt (Zend\Crypt component)
zendframework/zend-validator suggests installing zendframework/zend-db (Zend\Db component)
zendframework/zend-validator suggests installing zendframework/zend-math (Zend\Math component)
Writing lock file
Generating autoload files
The full list of dependencies that zend-http has are:
Escaper
Filter
i18n
Loader
ServiceManager
StdLib
Uri
Validator

Related

JupyterLab nvdashboard failed to install in Jupyter >= 3.0 with react >= 17.0.0

I would like to use the jupyterlab-nvdashboard to monitor the GPU performance from JupyterLab. Although it is not mentioned in the github, I found the extension is also available in the conda-forge channel and I installed it from there.
conda install -c conda-forge jupyterlab-nvdashboard
The installation went without errors and the last environment list entry shows that jupyterlab-nvdashboard-0.6.0 was installed together with the dependency pynvml-11.0.0:
2021-10-21 12:15:21 (rev 8)
+jupyterlab-nvdashboard-0.6.0 (conda-forge/noarch)
+pynvml-11.0.0 (conda-forge/noarch)
I am running a recent version of jupyter-lab >= 3.0
$ jupyter --version
Selected Jupyter core packages...
IPython : 7.28.0
ipykernel : 6.4.1
ipywidgets : not installed
jupyter_client : 7.0.6
jupyter_core : 4.8.1
jupyter_server : 1.11.1
jupyterlab : 3.1.18
This is the error I am getting when I tried to install the labextension.
$ jupyter labextension install jupyterlab-nvdashboard
An error occurred.
ValueError: The extension "jupyterlab-nvdashboard" does not yet support the current version of JupyterLab.
Conflicting Dependencies:
JupyterLab Extension Package
>=3.1.17 <3.2.0 >=2.0.0 <3.0.0 #jupyterlab/application
>=3.1.17 <3.2.0 >=2.0.0 <3.0.0 #jupyterlab/apputils
>=5.1.17 <5.2.0 >=4.0.0 <5.0.0 #jupyterlab/coreutils
>=17.0.1 <18.0.0 >=16.4.2 <17.0.0 react
>=17.0.1 <18.0.0 >=16.9.0 <17.0.0 react-dom
And this is the output of the server extension list command:
$ jupyter server extension list
Config dir: /home/<username>/.jupyter
Config dir: /home/<username>/anaconda3/envs/test/etc/jupyter
dask_labextension enabled
- Validating dask_labextension...
dask_labextension 5.1.0 OK
jupyter_server_proxy enabled
- Validating jupyter_server_proxy...
jupyter_server_proxy OK
jupyterlab enabled
- Validating jupyterlab...
jupyterlab 3.1.18 OK
jupyterlab_nvdashboard enabled
- Validating jupyterlab_nvdashboard...
X validation failed
I realized the dashboard works inside JupyterLab despite jupyter labextension telling me the X validation failed. So all good. =)

Deploy React JS SPA in Openshift

I have build a React JS app and triggered yarn build command. Its builded successfully and if I run yarn global add serve, its working perfectly on http://localhost:5000. After that I tried below link to deploy this code to OpenShift.
OpenShift Deployment
According to the document, I tried to run npx nodeshift --strictSSL=false --dockerImage=bucharestgold/centos7-s2i-web-app --imageTag=10.13.0 --build.env YARN_ENABLED=true --expose
Then I got this log -
npx: installed 216 in 37.284s
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:25:35
kubernetes-client deprecated require('kubernetes-client').config, use require('kubernetes-client/backends/request').config. ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\index.js:23:39
2019-12-21T11:58:07.841Z INFO loading configuration
kubernetes-client deprecated fromKubeconfig see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md#request-kubeconfig- ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\nodeshift-config.js:35:32
2019-12-21T11:58:07.882Z INFO using namespace smart-learner at https://c101-e.jp-tok.containers.cloud.ibm.com:30512
kubernetes-client deprecated Client({ config }), see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\openshift-rest-client\lib\openshift-rest-client.js:95:18
kubernetes-client deprecated Request() without a .kubeconfig option, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\node_modules\kubernetes-client\lib\swagger-client.js:200:19
2019-12-21T11:58:07.928Z WARNING a file property was not found in your package.json, archiving the current directory.
2019-12-21T11:58:07.929Z INFO creating archive of .gitignore, build, Dockerfile, package-lock.json, package.json, public, README.md, src, yarn.lock
2019-12-21T11:58:09.001Z INFO using existing build configuration smartlearner-s2i
2019-12-21T11:58:09.377Z INFO using existing image stream smartlearner
2019-12-21T11:58:09.378Z INFO uploading binary archive C:\ReactAPP\smartlearner/tmp/nodeshift/build/archive.tar
2019-12-21T11:58:15.825Z INFO binary upload complete
2019-12-21T11:58:15.828Z INFO waiting for build to finish
kubernetes-client deprecated .getStream use .getByteStream, see https://github.com/godaddy/kubernetes-client/blob/master/merging-with-kubernetes.md ..\..\Users\RITUPARNABHATTACHARY\AppData\Roaming\npm-cache\_npx\11068\node_modules\nodeshift\lib\build-watcher.js:56:107
2019-12-21T11:58:19.798Z TRACE Using bucharestgold/centos7-s2i-web-app:10.x as the s2i builder image
2019-12-21T11:58:20.550Z TRACE ls: cannot access /tmp/src/node_modules: No such file or directory
2019-12-21T11:58:20.564Z TRACE ---> Installing application source
2019-12-21T11:58:20.585Z TRACE ---> Building your Web Application from source
2019-12-21T11:58:20.592Z TRACE Current git config
2019-12-21T11:58:20.620Z TRACE url.https://github.com.insteadof=git#github.com:
2019-12-21T11:58:20.629Z TRACE url.https://.insteadof=ssh://
2019-12-21T11:58:20.629Z TRACE url.https://github.com.insteadof=ssh://git#github.com
2019-12-21T11:58:20.630Z TRACE ---> Using 'yarn install' with YARN_ARGS
2019-12-21T11:58:21.356Z TRACE yarn install v1.10.1
2019-12-21T11:58:21.594Z TRACE warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
2019-12-21T11:58:21.657Z TRACE [1/4] Resolving packages...
2019-12-21T11:58:23.111Z TRACE [2/4] Fetching packages...
2019-12-21T11:58:53.081Z TRACE error #typescript-eslint/eslint-plugin#2.10.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "10.12.0"
2019-12-21T11:58:53.083Z TRACE error Found incompatible module
2019-12-21T11:58:53.086Z TRACE info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2019-12-21T11:58:58.441Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-web-app:10.x
2019-12-21T11:59:00.497Z ERROR build failed with message: Assemble script failed.
2019-12-21T11:59:00.503Z ERROR Assemble script failed.
i am not able to understand what I am missing here. I found that bucharestgold/centos7-s2i-web-app has been depreicated and tried with npx nodeshift --strictSSL=false --dockerImage=nodeshift/ubi8-s2i-web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000 --expose. This is also throwing same error message.
You can use the new web-app flag feature and let nodeshift set the appropriate docker image.
Try running this command instead npx nodeshift --web-app --build.env YARN_ENABLED=true --deploy.env NPM_RUN="npx yarn start" --deploy.port=3000

PHP Coinbase API not working on live but localhost

I'm developing a system that will send BTC to a certain receiver via coinbase php api. The system is working fine in my localhost but after moving it to live it doesn't work and no error message. I tried tracing an error step by step by echoing the -3 and run the script and I found that when I put the echo after
$account = $client->getPrimaryAccount();
echo -3;
...I've got a white page and no -3 as a test result.
Here's the full construction of this process:
$apiKey = "dfdsfsd";
$apiSecret = "fdsfdsfsfdff";
$configuration = Configuration::apiKey($apiKey, $apiSecret);
$client = Client::create($configuration);
$_btc_wallet = #$_GET['_btcwallet'];
$_btc_amount = #$_GET['_btc_amount'];
$transaction = Transaction::send([
'toBitcoinAddress' => $_btc_wallet,
'bitcoinAmount' => $_btc_amount,
'description' => 'Group Fund Transfer',
]);
$account = $client->getPrimaryAccount();
echo -3;
$client->createAccountTransaction($account, $transaction);
echo 1;
exit;
Need help badly.... :-(
Tl;dr. You must install and run Composer and add this line before
the rest of your code:
require __DIR__ . '/vendor/autoload.php';
Coinbase PHP API uses Composer to handle its dependencies, so that following the install procedure detailed on Github is mandatory to avoid headaches.
Composer reads a configuration file provided by the author of the Coinbase PHP API, and creates automatically a directory structure that contains all the dependencies needed, and, most important, an autoload script.
PHP used to be 100% self contained, having a plethora of functions and classes already built in, so many PHP coders (me for example) had some problems to switch to a more modular approach, someway similar to the Python style with its pip command or to PEAR in Perl galaxy, and so on, with some important differences, of course.
So, be sure to follow this sequence:
1) Let's say you are on Linux, you have a local web server installed, and the document root of your web site is /var/www/newsite.
2) Enter the your document root, download the latest Coinbase PHP API release and untar/unzip it. I suggest to go for the releases, and not to clone the repository.
$
$ cd /var/www/newsite
$
$ tar xzvf coinbase-php-2.5.0.ta.gz
3) Now you need to download Composer. Go to its homepage at https://getcomposer.org/ and click on Download. Follow the instructions in the Command-line installation section.
I report them here for convenience, but they may change so always check the Composer's homepage. From your document root:
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"
4) last step, run Composer and wait while he does the job:
$ php composer.phar install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 26 installs, 0 updates, 0 removals
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
- Installing guzzlehttp/guzzle (6.2.3): Downloading (100%)
- Installing psr/log (1.0.2): Downloading (100%)
- Installing symfony/yaml (v3.2.8): Downloading (100%)
- Installing sebastian/version (1.0.6): Downloading (100%)
- Installing sebastian/global-state (1.1.1): Downloading (100%)
- Installing sebastian/recursion-context (1.0.5): Downloading (100%)
- Installing sebastian/exporter (1.2.2): Downloading (100%)
- Installing sebastian/environment (1.3.8): Downloading (100%)
- Installing sebastian/diff (1.4.2): Downloading (100%)
- Installing sebastian/comparator (1.2.4): Downloading (100%)
- Installing doctrine/instantiator (1.0.5): Downloading (100%)
- Installing phpunit/php-text-template (1.2.1): Downloading (100%)
- Installing phpunit/phpunit-mock-objects (2.3.8): Downloading (100%)
- Installing phpunit/php-timer (1.0.9): Downloading (100%)
- Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)
- Installing phpunit/php-token-stream (1.4.11): Downloading (100%)
- Installing phpunit/php-code-coverage (2.2.4): Downloading (100%)
- Installing webmozart/assert (1.2.0): Downloading (100%)
- Installing phpdocumentor/reflection-common (1.0): Downloading (100%)
- Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%)
- Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%)
- Installing phpspec/prophecy (v1.7.0): Downloading (100%)
- Installing phpunit/phpunit (4.8.35): Downloading (100%)
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
$
5) Mind the last line above. The examples on the Github's README of the Coinbase PHP API are a little bit misleading, since Composer is nice and creates a file called autoload.php which must be used to load the new libraries the proper way.
So, here is your code modified to use it, thus loading all the needed dependencies:
<?php
require __DIR__ . '/vendor/autoload.php';
$apiKey = 'topsecret';
$apiSecret = 'topkey';
$configuration = Configuration::apiKey($apiKey, $apiSecret);
$client = Client::create($configuration);
$account = $client->getPrimaryAccount();
The line:
require __DIR__ . '/vendor/autoload.php';
should make the difference. Without it, the script exits with no errors on screen, but with many errors in the php log file, but this behaviour depends on the server configuration.
Hope this helps!

unable to install m2e-wtp maven in eclipse juno

Cannot complete the install because one or more required items could not be found.
Software being installed: m2e-wtp - JPA configurator for WTP (Optional) 1.0.1.e42-20130821-1033 (org.eclipse.m2e.wtp.jpa.feature.feature.group 1.0.1.e42-20130821-1033)
Missing requirement: Maven Integration for Eclipse WTP 1.0.0.20130613-0136 (org.eclipse.m2e.wtp 1.0.0.20130613-0136) requires 'bundle org.eclipse.m2e.maven.runtime [1.4.0,2.0.0)' but it could not be found
Missing requirement: Maven Integration for Eclipse WTP 1.0.1.20130911-1545 (org.eclipse.m2e.wtp 1.0.1.20130911-1545) requires 'bundle org.eclipse.m2e.maven.runtime [1.4.0,2.0.0)' but it could not be found
Cannot satisfy dependency:
From: Maven JPA Configurator 1.0.1.e42-20130821-1033 (org.eclipse.m2e.wtp.jpa 1.0.1.e42-20130821-1033)
To: bundle org.eclipse.m2e.wtp 1.0.0
Cannot satisfy dependency:
From: m2e-wtp - JPA configurator for WTP (Optional) 1.0.1.e42-20130821-1033 (org.eclipse.m2e.wtp.jpa.feature.feature.group 1.0.1.e42-20130821-1033)
To: org.eclipse.m2e.wtp.jpa [1.0.1.e42-20130821-1033]
The message is saying the install needs the org.eclipse.m2e.maven.runtime plugin with a version of at least 1.4.0 (and not above 2.0.0).
I think Eclipse Juno has an earlier release of this plugin so you will need to move to a newer version of Eclipse to use this.

cakephp websocket ratchet install error

I am trying to install Cakephp Ratchet Plugin in existing project.
My CakePHP version is 2.4.3.
It says to follow this link which has following steps:
$ cd myproject/app/
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar require --no-update opauth/opauth:dev-wip/1.0 opauth/twitter:dev- wip/1.0
$ php composer.phar config vendor-dir Vendor
$ php composer.phar install
I am not very familiar with composer and when i do the last step,it shows following error....
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package opauth/opauth could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package opauth/twitter 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
EDIT:
Composer.json is like this
{
"require": {
"opauth/opauth": "dev-wip/1.0",
"opauth/twitter": "dev-wip/1.0"
},
"config": {
"vendor-dir": "Vendor"
}
}
As already mentioned in my comment, the Ratchet Plugin has nothing to do with Opauth, the linked article over at ceeram.github.io should only serve as an example on how to configure Composer and the CakePHP bootstrap.
However, for Composer autoloading in CakePHP I'd recommend to refer to the CakePHP cookbook, even if you're not including CakePHP itself via Composer:
http://book.cakephp.org/2.0/en/installation/advanced-installation.html
Long story short, what the "Getting Started / 2. Composer" section of the plugin docs want you to do, is to require the ratchet plugin, to make sure the vendor dir points to /app/Vendor/, and to include the Composer autoloader in your bootstrap.php.
composer.json (assuming it's placed in /app)
{
"require": {
"wyrihaximus/ratchet": "dev-master"
},
"config": {
"vendor-dir": "Vendor"
}
}
bootstrap.php (as per Cookbook)
// Load Composer autoload.
require APP . '/Vendor/autoload.php';
// Remove and re-prepend CakePHP's autoloader as Composer thinks it is the
// most important.
// See: http://goo.gl/kKVJO7
spl_autoload_unregister(array('App', 'load'));
spl_autoload_register(array('App', 'load'), true, true);
Run composer install or composer update and you should be good.

Resources