astorm / magento2-tutorial-proxy-objects Goto Github PK
View Code? Open in Web Editor NEWStarter code for the Magento 2 proxy object tutorial
Starter code for the Magento 2 proxy object tutorial
I do make 2 file registation.php
remove comment in di.xml like this
<!-- Proxies as preferences won't work -->
<preference
for="Pulsestorm\TutorialProxy1\Model\SlowLoading"
type="Pulsestorm\TutorialProxy1\Model\SlowLoading\Proxy"
/>
and remove comment in Testbed.php
class Testbed extends Command
{
....
protected function execute(InputInterface $input, OutputInterface $output)
{
// $this->installedCheck($output);
$service = $this->createService($output);
$this->sayHelloWithFastObject($service, $output);
$this->sayHelloWithSlowObject($service, $output);
}
}
But
I have try all of those but it not work
php bin/magento c:c
php bin/magento c:f
rm -rf generated/
rm -rf var/cache/
delete vendor, composer install
Hey Alan,
Thanks for your tutorials, i enjoy them.
I've tried to enable proxy as you wrote in the article.
The proxy class has been generated.
When i run it i getting segmentation fault, please read bellow:
$ php bin/magento ps:tutorial-proxy
About to Create Service
Constructing FastLoading Object
Constructing SlowLoading Object
Created Service, approximate time to load: 3005.1239 ms
About to say hello with fast object
Hello
Said hello with fast object, approximate time to load: 0.0112 ms
About to say hello with slow object
Segmentation fault: 11
Do you have any guessing why it happens?
Thanks for your reply
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.