Typo3 10.4.1 Extension Builder: No tables created for new extension - typo3-extensions

I have a TYPO3 10.4.1 installation (composer mode) on ubuntu 20.04 with php 7.4 and a mariadb database and installed the extension "Extension Builder" (v10-compatibility). When I create a new extension with domain model using the Extension Builder and save it there appears no errors, also when I add it to the composer.json and run the composer require command. However, there are no tables created in the database.
Does anyone has an idea where to start looking for the problem?
Thanks a lot in advance!

You can add the extension "typo3_console" (composer req helhum/typo3-console) and then add this section in your composer.json :
"scripts": {
"install-updateschema": [
"typo3cms database:updateschema"
]
}
This will automatically update database schema with a composer install/update.
More information here : https://docs.typo3.org/typo3cms/extensions/typo3_console/5.6.0/CommandReference/Index.html

Related

how to remove jetstream and fortify in laravel?

I am trying to remove Fortify and Jetstream packages from Laravel so I removed them from App. Providers, from composer.json (require section), Actions, Config, vendor. Then I run composer update and I get the following message:
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
I also remove sanctium from the same locations
Only remove from composer.json file won't delete them fully. You need to remove and modify some file manually.
Edit away
app/Http/Kernel.php - \Laravel\Jetstream\Http\Middleware\AuthenticateSession::class,
app/Models/User.php - use HasProfilePhoto;
config/app.php - App\Providers\FortifyServiceProvider::class,
config/app.php - App\Providers\JetstreamServiceProvider::class,
routes/web.php - routes with auth:sanctum
Delete
app/Providers/FortifyServiceProvider.php
app/Providers/JetstreamServiceProvider.php
app/View/Components/AppLayout.php
app/View/Components/GuestLayout.php
app/Actions/Fortify/
app/Actions/Jetstream/
config/fortify.php
config/jetstream.php
config/sanctum.php
I'm using Laravel 8. The solution may differ depending on the version.
You May also Clear the bootstrap/cache directory.
see this answer
Firstly Remove the Modified Files From Your Project after that Remove it From your composer.json and run the following Command
composer remove vendor/package
Running the following command will remove the package from vendor composer.json and composer.lock
And After that Run Composer Update thats all

Separate Ember Addon from vendor.js file to a separate file

I'm using a "core"-addon which contains logic that is used in multiple "boilerplate" - ember applications, when I build a boilerplate-application, the addon code is added to the "vendor.js" file found in the "assets"-folder. Is there a way I can make this code build to a separate "my-addon-vendor.js" file?
While browsing I found others with the same need, but an answer has yet to be found.
My "core"-addon is linked to my "boilerplate"-project using "npm link my-core-addon".
Thanks in advance
Versions:
Ember Version: 3.5.0
Ember CLI: 3.5.0
Node: 8.11.3
npm: 5.6.0
You could do something like this:
var qrScannerWorker = new Funnel(
'node_modules/qr-scanner/', {
include: ['qr-scanner-worker.min.js'],
destDir: '/libraries/qr-scanner/'
}
);
https://github.com/NullVoxPopuli/emberclear/blob/master/packages/frontend/ember-cli-build.js#L139
this won't work for addons, but it'll work for underlying dependencies. So, if an addon is doing the bundling for you, you may want to do it yourself.

Symfony 4 + FOSRESTBUNDLE

Good Evening. Please i'm using Symfony 4 to create an API. I've installed the FOSRESTBUNDLE but i don't see where i can modify the configuration file of this bundle. Please i'll like to set a configuration like
fos_rest:
view:
#…
view_response_listener: true
In Symfony 2, we do it in app/config/config.yml. Please Where will i do this in Symfony 4?
Look at this article: https://codereviewvideos.com/course/beginners-guide-back-end-json-api-front-end-2018/video/setup-symfony-4-fosrestbundle
Check if you required this bundle with following command:
composer require friendsofsymfony/rest-bundle
If you require it with this command but you still don't see file config/packages/fos_rest.yaml execute following command
composer fix-recipes
If you still don't see this config file, you can just copy-paste it from original recipe repository: https://github.com/symfony/recipes-contrib/tree/master/friendsofsymfony/rest-bundle/2.2/config/packages
Also check that this bundle is included in config/bundles.php

Tymon JWTAuth class not found

I want to use laravel for building api.
I installed JWTAuth from installation guide on wiki page. When I want to use vendor:publish, I get this error:
After 3days searching on Google, I can not find a solution that working for me. How can I fix this?
For latest version. Please use following code in providers array in config file
For laravel
Tymon\JWTAuth\Providers\LaravelServiceProvider::class
For Lumen : open app/Providers/AppServiceProvider.php and add the following to the register() method.
$this->app->register(\Tymon\JWTAuth\Providers\LumenServiceProvider::class);
Hope this will help someone.
Simply means you have not added JWTAuthServiceProvider to list of Laravel Service providers.
Go to config/app.php and add JWTAuthServiceProvider to providers list
Like so:
'providers' => [
...
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
...
]
Secondly since these error occurs only in console run:
composer update --no-scripts
composer update
add "tymon/jwt-auth": "^0.5.12" to composer.json and command
composer update
on app/config.php add this to providers
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
and on app/config.php add this on aliases
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
tested on laravel 5.5 and tymon/jwt-auth": "^0.5.12"

Installing behat on a Symfony 2.0 project using deps - what versions?

I have a legacy Symfony 2.0 project (version 2.0.11 to be precise) to which I'd like to add behat tests. As it's Symfony 2.0, it uses the deps vendor system rather than composer. I'm not in a position to upgrade the Symfony version or switch to composer at the moment.
I attempted to install behat using the following deps settings:
[Mink]
target=/Behat/Mink
git=git://github.com/Behat/Mink.git
version=v1.3.3
[MinkBundle]
target=/Behat/MinkBundle
git=git://github.com/Behat/MinkBundle.git
[BehatBundle]
target=/Behat/BehatBundle
git=git://github.com/Behat/BehatBundle.git
[Gherkin]
target=/Behat/Gherkin
git=git://github.com/Behat/Gherkin.git
version=v2.1.1
[Behat]
target=/Behat/Behat
git=git://github.com/Behat/Behat.git
version=v2.3.5
[Goutte]
target=/Goutte
git=git://github.com/fabpot/Goutte.git
(Yes, I know that the BehatBundle etc are outdated, but it looked like I'd need these outdated versions given that I'm using deps and sf2.0.)
When I run vendor/Behat/Behat/bin/behat, I then get the issue described here:
PHP Warning: require_once(behat/autoload.php): failed to open stream: No such file or directory in /home/sam/wo-code/PersonaBubble/vendor/Behat/Behat/bin/behat on line 23
PHP Fatal error: require_once(): Failed opening required 'behat/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/sam/wo-code/PersonaBubble/vendor/Behat/Behat/bin/behat on line 23
I realised that behat 2.3.5 doesn't actually have an autoload.php file. I looked through Behat's tags on Github and realised that 2.1.3 was the latest version which had an autoload.php (actually autoload.php.dist, though every earlier version also had autoload.php.dist rather than autoload.php, so I assumed that this was it).
I therefore changed my behat version number in deps to v2.1.3, deleted my vendors and re-installed. The behat command had then changed, so I ran:
php vendor/Behat/Behat/bin/behat.php
I now saw this error:
PHP Fatal error: Class 'Symfony\Component\Console\Application' not found in /home/sam/wo-code/PersonaBubble/vendor/Behat/Behat/src/Behat/Behat/Console/BehatApplication.php on line 26
Does anyone know what the correct versions of behat etc are that I should use to get it working with Symfony 2.0 and deps? Or is there some other step that I'm missing.
PS I ended up running behat via PHAR (although this had other problems so I abandoned it as not worth it). However, I really want to know how to do it via standard vendors install, hence this post.
I'm not in a position to upgrade the Symfony version or switch to
composer at the moment.
I understand what you say but example below might give you a bit of hint I hope! I hope it helps a bit.
I'm sharing what I have been using for all my Symfony2 projects. Behat+Mink+Selenium
CONPOSER:
You need certain versions so that eveyone use same versions of everthing.
mySymfonyProject/composer.json:
"require": {
"behat/behat": "2.5.*#stable",
"behat/behat-bundle": "1.0.0",
"behat/symfony2-extension": "1.1.2",
"behat/mink": "1.5.0",
"behat/mink-extension": "~1.3",
"behat/mink-selenium2-driver": "1.1.1",
"behat/mink-goutte-driver": "1.0.9"
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "dev",
BEHAT
mySymfonyProject/behat.yml:
default:
context:
class: FeatureContext
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
base_url: 'http://mysymfonyproject.local/app_test.php/'
javascript_session: selenium2
browser_name: firefox
goutte: ~
selenium2: ~
paths:
features: %behat.paths.base%/src
bootstrap: %behat.paths.features%/Context
SELENIUM
Download into your project. It is here, make sure you download 2.43.1 version which is in the middle of the page.
Run it: java -jar selenium-server-standalone-2.43.1.jar
CONTEXT FEATURE
mySymfonyProject/src/Site/CommonBundle/Features/Context/FeatureContext.php
<?php
namespace Site\CommonBundle\Features\Context;
use Behat\MinkExtension\Context\MinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Symfony\Component\HttpKernel\KernelInterface;
class FeatureContext extends MinkContext implements KernelAwareInterface
{
/**
* Hold Symfony kernel object.
*
* #var object Kernel Object.
*/
protected $kernel;
/**
* Helps to use doctrine and entity manager.
*
* #param KernelInterface $kernelInterface Interface for getting Kernel.
*/
public function setKernel(KernelInterface $kernelInterface)
{
$this->kernel = $kernelInterface;
}
//And your own methods
}
TESTS
When you have feature files you can run them like this (this runs all in one go. for more info read behat doc):
bin/behat #SiteCommonBundle