TideSDK add php extension - tidesdk

Is it possible to add php extensions when using TideSDK ?
I added the .dll extension in the "ext" folder in php and also added it in php.ini but I still get an error that it doesn't know the function I'm using.

Currently this is not possible as only few embedded plugins are currently supported on Tidephp. We are trying to upgrade to newer php can you provide details about which php plugin you are trying to add.

Related

Can't add a breakpoint to Twig files in VS Code

I am trying to debug a Twig template in my Drupal 9 site. I am using VSCode as my IDE and using Xdebug for debugging. I have setup/configured the installation based on the instructions outlined here -
https://www.drupal.org/docs/develop/development-tools/configuring-visual-studio-code
I am able to set breakpoints in PHP files (step thru and watch variables successfully) however I just can't seem to do the same for Twig template files (just so I can see what variables I have access to in that template). What I mean by when I say I am unable to add the breakpoint is that clicking on the gutters of a Twig file within VSCode does not result in addition of any breakpoint.
I'd like to take advantage of Xdebug instead of using debugging functions like breakpoint() and dump() offered by the Devel and Twig_xdebug modules within Drupal. I am pretty sure I am doing something wrong or have missed a step but I can't seem to figure out what it is.
Some more details on my env:
a local Drupal 9 setup on a Mac OS that uses PHP 7.4 and nginx as its webserver.
Xdebug (v3.1.1) is installed and enabled (verified via phpinfo() output)
VSCode (1.63.0) installed with all of the supporting Drupal and PHP extensions outlined in the above article (specifically php-debug) have been installed.
I am using the default launch configuration to Run my debug session in VSCode.
I'd appreciate any pointers on what I am doing wrong and/or what I can try. Also, I hope I provided enough info on my use case.
Twig compiles the template files into PHP files. You need to set breakpoints in these Twig generated PHP files in order to debug them.
On this page, I also see that there is caching involved, which you will need to disable. That documentation seems to be quite comprehensive.
Came here looking for an answer to this very question.
You may be interested to know that there are a couple of ways to achieve this. You can either use a built-in feature of the devel.module (see: https://www.drupal.org/node/2788089) or there is also a contrib module called twig_xdebug, which lives here: https://www.drupal.org/project/twig_xdebug
I think the mechanism behind both of these is probably very similar, to be honest. The latter of those links provides further links to several guides on the subject matter. HTH! :)

Use third party composer packages in TYPO3 extensions

I have integrated a Service Worker for receiving Push Notifications in my TYPO3 Extension.
Now I want so send Messages form backend to the clients web-push-php Library.
But how it is possible to integrate the library and its dependencies to TYPO3?
If you set up your project with composer you can just require minishlink/web-push and start using class Minishlink\WebPush\WebPush.
In case you‘re running in "legacy" mode (i.e. classic install without composer) or want to support both you‘ll need a different approach. IMO best practice is bundling composer requirements in .phar files - this way you can keep your IDE clean and your VCS footprint small. There‘s a blog post with a detailed description about phar bundling in TYPO3 extensions.
This method works for most composer requirements following PSR-0 or PSR-4 and should be viable in your case as minishlink/web-push seems to follow PSR-4.
You can even advance this by using scripts you can launch by running composer run <script> in your extension‘s root folder. TYPO3 extension typo3_console holds a composer.json defining such scripts.
If you need to run your extension in a TYPO3 6.2 environment you‘ll need to remove composer.json from extension folder as 6.2 fails coping with "real composer requirements" (i.e. non-TYPO3-extension packages).

Aptana Studio Code Assist for WordPress is incomplete

I installed the WordPress bundle/ruble for Aptana Studio, but it's only providing code assistance for a subset of WordPress functions. I'd like code assistance for all WordPress core functions (or as many as possible). My projects have PHP as their nature, and are connected via SFTP to remote WordPress installations.
After the bundle (which hasn't been updated in over a year) didn't provide everything I was looking for, I tried using a local copy of WordPress as an external library, then adding it as an external directory to the PHP Buildpath. Neither one added any more functions than the bundle provided. These actions were suggested in Aptana Studio Support and WordPress Answers.
Am I doing something wrong, or is the level of code assistance I'm looking for not available?
It's true that the WordPress bundle offers just some limited auto-completion support. Though including the local copy of another WordPress installation as a PHP external library seemed to solve this in the latest Aptana Studio version (3.4.0,) as you already mention to have tried, and as it is suggested in this one of the links that you pointed out.
Here are all the specific steps I took, so you can check if there was something different in the procedure you followed.
Open the Preferences menu going to Window > Preferences
Select Aptana Studio > Editors > PHP > Libraries
Click "New user library"
Add the path to another local WordPress installation (not the same WordPress files in the current project,) selecting the root folder of a freshly extracted WordPress download (e.g.: C:\wordpress-3.5.1\wordpress)
Make sure the new library is selected in the user libraries list (marking it with a checkmark next to the library icon.)
Apply the changes and press OK
Make sure your project is a PHP project. Right click the project folder, select Properties > Project Natures and mark the PHP checkbox.
Now, inside PHP code, I get autocompletion suggestions for all core WordPress functions - and I can even go to check their source by pressing F3 on their function name.
I followed the steps of E. Serrano and it works perfectly. What is silly is that if you want autocompletion for, say, add_action('wp_print_footer_scripts', 'scripts.js', 1); the moment that you type the quote, autocompletion is lost... if you try add_action( wp_ you get all WP commands. Hope it helps...

Downgrade wordpress plugin to use older version of php

I developed a website in wordpress and used several plugins. One of the plugin was http://wordpress.org/extend/plugins/background-manager/
Every thing was working fine on my machine. But as i get uploaded it to client server. the whole site stuck due to lower version of PHP. This plugin requires PHP 5.3 and on server we have PHP 5.2. Since its a shared server, we can't upgrade its PHP.
Then i look into the code of this plugin it was using PHP 5.3 feature namespaces. Is there any way to downgrade this plugin that it will work with PHP 5.2?
This is a really tricky problem, and of course, it's really, really bad practice to use old code for plugins as they may have fixed security vulnerabilities or other serious problems. It would be better for you to move the site to a server with more up to date PHP.
Having given that important warning, you can, however, browse to the tags directory in the plugin repository and extract the files you want for the previous version. Plugin history is public and always maintained.
For instance, for the plugin you mentioned, you can visit the SVN part of the plugin repository at:
http://plugins.svn.wordpress.org/background-manager/
You'll find the previous versions there under the "tags" folder, named after their versions.

Including vendor assets in Symfony2

My goal is to use Twitter Bootstrap with my Symfony2 project. So, in my deps file I've added the following;
[twitter-bootstrap]
git=https://github.com/twitter/bootstrap.git
version=v1.4.0
...and ran bin/vendors install that downloads the library to the vendors directory. Now, I have no idea on how to include any of the assets in the parent twig template. Do I need to create a custom "Bundle" or is including the vendors lib simply good enough?
Probably, you are looking for this bundle. It does things you need.

Resources