phpstorm setup for typo3 extension development on windows with typo3 on linux server

Hi,

I am new to phpstorm and want to setup phpstorm on my windows mashine to work with a typo3 installation on my linux server to be able to develop some typo3 extensions.

I already have setup a project and the deployment to the related server direcotry works fine (using ssh).

When trying to run some tests I get the message that some typo3 classes are not found. They are included by 

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

Is there anywhere a howto for the setup of a project in phpstorm in such an environment?

Regards

Karl-Heinz

 

0

Thank you for the confirmation.

Do you mind me asking if you have already tried the Remote Development feature as suggested there?


Also, as I see it, you may try configuring deployment to have a synced copy of your project locally:
https://www.jetbrains.com/help/phpstorm/tutorial-deployment-in-product.html

0

Vasiliy Yur: I tiped a lot of answer text and now it is gone!

0

Vasiliy Yur:

O.K. again!

From my understanding this is only the setup to sync the source files on my win phpstorm installation to the T3 server.

This works fine for me already.

Testing does not work (PHPUnit tests).

Normally you work with the phpunit installation on the linix OS. This is the current setup I have and I can run phpunit tests.

The setup for this is like this:

use PHPUnit\Framework\TestCase;

and

class VcardControllerTest extends TestCase

but based on the documentation of T3 (outside of phpstorm) it should be like this:

use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

and

class VcardControllerTest extends UnitTestCase

I assume, the T3 TestingFramework does set automatically some T3 specific environment. Since, from my understanding as a starter in this, if you call a function to test this is a direct call from the test script. In T3 normally this function is called from inside T3 where some enviroments (like a FrontendView ...) already exist.

 

So I assume there must be a special setup to use the T3 testing framework and let phpstorm then run it as phpunit test.

But how to setup?

 

 

 

 

 

 

 

 

 

 

0

Hi Vasiliy Yur,

I guess I found a solution, although the tests curenntly still give an error.

TYPO3 unit testing means using the phpunit testing framework. TYPO3 comes with as basic UnitTests.xml file that can be used by Core and extensions. This references a phpunit bootstrap file so phpunit does find our main classes.

It wasn't easy to find the settings in the T3 source files. But now the testscripts are available as PHPUnit Tests.

Will see how it goes on!

 

 

 

 

0

Hello Karl-Heinz,

Thank you for the update, it sounds really promising! Just to confirm, do the tests actually work now?

0

请先登录再写评论。