load external class placed in vendor folder in controller by composer cakephp3 - soap

Actually i want to use soap class in my cakephp application. For that i have created one class file named Wsdl as it call function of wsdl using soap which is placed in Vendor directory.
Now in my ClassController i want to include this class by composer.
below is my composer.json file code:
"autoload": {
"psr-4": {
"App\\": "src"
},
"classmap": [
"./vendor/WsdlClass/Wsdl"
]
},
in my ClassController i am trying to include this file using
useing code:
use Vendor\WsdlClass\Wsdl;
I am getting error of
Error: Class 'vendor\WsdlClass\Wsdl' not found
How can i fix this issue of composer??

Related

TYPO3 GeneralUtility Class 0; not found (own generic extension)

After creating my own Extension with the ExtensionBuilder-Package and activating it, I created a repository for the data and set the Storage-PID in the Template-Constants.
Then I created a new page containing the extension (with default values) and on viewing the page the following error appears and the page does not show:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Class '0;' not found | Error thrown in file /var/www/html/typo3Insy/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php
For the setup I used the TYPO3 version 9.5.23 and have not migrated from a previous one.
Thanks to #Jack70 I found out, that an autoloader needs to be supplied for my own extension in the composer.json-File of the TYPO3-installation itself.
From the composer.json-File of the created extension itself, you can extract the vendor name and the site package. Make sure the case matches when supplying it to the autoloader-section:
"autoload": {
"psr-4": {
"MyVendor\\MySitePackage\\": "pathToTheClassesDirectoryOfYourExtension"
}
}
After that you can simply run composer dump-autoload and this error will be fixed (without restarting the webserver).
I found out about this here: https://wiki.typo3.org/Exception/CMS/1289386765

Product images issue in vue storefornt

I integrated vue store front with magento 2, frontend works fine but product images not display in frontend. It throws error Unable to compile TypeScript:\nsrc/image/action/local/index.ts(27,18): error TS2339: Property 'query' does not exist on type 'Request<any, any, any, any>'. imagemagick is also installed and imgurl in local.json is also defined.
Anyone please know about this why error display.
It is about this.req which is typeof Request from express - it has query property. Please make sure you have yarn.lock from the original repo and reinstall dependencies.
If you are using docker, you might need to add:
- './yarn.lock/var/www/yarn.lock'
To volumes section in the docker-compose.nodejs.yml
i have found a simple solution you can try that
copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media
Or
create a symlink if you are working on localhost
vue-storefront-api/config/local.json
"magento2": {
"imgUrl": "http://magento-domain/pub/media/catalog/product",
"assetPath": "/../var/magento-folder/pub/media",
}
vue-storefront/config/local.json
"images": {
"useExactUrlsNoProxy": false,
"baseUrl": "http://localhost:8080/img/",
"useSpecificImagePaths": false,
"paths": {
"product": "/catalog/product"
},
"productPlaceholder": "/assets/placeholder.jpg"
},
run command in vue-storefront and vue-storefront-api

i am trying to configure Lexik JWT Bundle but i am getting error which is given below

There is no extension able to load the configuration for "jwt_private_key_path" (in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml). Looked for namespace "jwt_private_key_path", found "framework", "security", "twig", "monolog", "swiftmailer", "doctrine", "sensio_framework_extra", "doctrine_mongodb", "lexik_jwt_authentication", "fos_rest", "debug", "web_profiler", "sensio_distribution" in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml (which is being imported from "/var/www/html/EduboldPortalApp/eduboldportal/app/config/config.yml").
There is no extension able to load the configuration for "jwt_private_key_path" (in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml). Looked for namespace "jwt_private_key_path", found "framework", "security", "twig", "monolog", "swiftmailer", "doctrine", "sensio_framework_extra", "doctrine_mongodb", "lexik_jwt_authentication", "fos_rest", "debug", "web_profiler", "sensio_distribution"
Are you sure the bundle has been added to the app/AppKernel.php ?
From the error it seems like symfony is not loading the bundle.

Extended application descriptor file and invalid datasource

I have two applications:
hrportalcore: The core application with BaseController, ...
hrportalrequestleave: A sample application extended from the hrportalcore application
The hrportalcore has the namespace de.example.core and there are the dataSources also maintained. (sap.app.dataSources in manifest.json). The datasource is:
[...]
"HRPOJavaLeave": {
"uri": "<path>",
"type": "OData",
"settings": {
"annotations": [],
"odataVersion": "2.0",
"localUri": ""
}
}
[...]
The datasources can be used without any problems in the extended application but the console brings the following errors:
It says the datasource contains errors, but it can be used (strange?).
Another thing is, that the Component-preload.js file is loaded from a wrong place once a time. The application works without problems, but it is - as said - loaded once from a wrong location?
My manifest.json of the hrportalrequestleave looks like in the extension part (sap.ui5.extends):
[...]
"extends": {
"component": "de.example.core",
"extensions": {}
},
[...]
The parent is defined rightly in the neo-app.json as /parent to show to hrportalcore.
jQuery.sap.declare("de.example.request.leave.Component");
// use the load function for getting the optimized preload file if present
if (!jQuery.sap.isDeclared("de.example.core.Component")) {
sap.ui.component.load({
name: "de.example.core",
// Use the below URL to run the extended application when SAP-delivered application is deployed on cloud
url: jQuery.sap.getModulePath("de.example.request.leave") + "/parent"
// we use a URL relative to our own component
// extension application is deployed with customer namespace
});
}
this.de.example.core.Component.extend("de.example.request.leave.Component", {
metadata: {
manifest: "json"
}
});
This all happens in the Fiori Launchpad of HANA Cloud Platform
Solution
manifest.json of hrportalcore: Always use the up-to-date version which you have deployed on your HCP in the applicationVersion property:
{
"_version": "1.2.0",
"sap.app": {
"_version": "1.2.0",
"applicationVersion": {
"version": "1.6.2"
},
...
manifest.json of hrportalrequestleave (Extension project): As above, always use the up-to-date version which you have deployed on your HCP in the applicationVersion property.
DataSource not found?!
If you have a extension project (like hrportalrequestleave < hrportalcore), then the manifest.json of both applications are merged like jQuery.extend(...). All properties, expect the sap.app tree, because it describes really the application and can not be copied from parent extension.
Now, when you use a dataSource from the parent extension, it will not be found. That means for you, you must define the sap.app.dataSources in the extension project manifest.json.
The error in the log
"Error in application dependency de.example.core.Component: No descriptor was found"
suggests that the manifest.json contains a dependency to "de.example.core.Component" instead of "de.example.core". According to your code snippets, the "extends" dependency is correct. Do you have other dependencies?
The AppIndex in the backend calculates the transitive closure of dependencies and if it can't find an installation with that ID, the above error is created and logged on the client side.
If your manifest.json looks okay but might have contained a wrong dependency in the past, then it might be necessary to re-run the AppIndex (or schedule it for a regular run).
The fact that the app works despite the config error is caused by the code that you've shown above. It explicitly loads the de.example.core component from an explicitly calculated URL. But before that step, the framework already tries to load it, based on the information in the manifest.json and there the information about the explicit URL is missing.
BTW: the code that calculates the URL suggests that even after fixing the manifest.json, the AppIndex might not find the component as it seems to be stored in a sub package of the de.example.request.leave app. Not sure if the AppIndex can handle this (it can handle nested components if they are listed as embedded components in the top level manifest.json, but I'm not sure if it recognizes such embedded components in the dependencies section. As a result it might try to load the embedded component although it has been loaded together with the enclosing component already.

Yii2 Module setup in advanced template

I have created a module in frontend folder path is frontend/modules/module-name/Module.php. I am getting ReflectionException error as Class app\modules\module-name\Module does not exist. In frontend/config/main.php i have added this configuration
'modules' => [
'module-name' => [
'class' => 'app\modules\module-name\Module'
]
Can anyone help why i am getting this ReflectionException error
You said that you are using an advanced template, folder path is frontend/modules/module-name/Module.php, but you are requiring app\modules\module-name\Module class. It looks like a namespace from basic application template.
In case of advanced template, make sure that Module.php file is in frontend/modules/module-name folder, has a namespace frontend\modules\module-name and you are requiring frontend\modules\module-name\Module class.