Try to update TYPO3 Core via Composer - typo3

Working with a local installation (ddev & TYPO3 9.5 LTS).
Try to update the TYPO3-Core with:
composer update typo3/cms-* --with-all-dependencies
But Nothing to install or update.
Package mso/idna-convert is abandoned, you should avoid using it. Use algo26-matthias/idna-convert instead.
Try to install composer require algo26-matthias/idna-convert but it won't help. What's going on? It's still my first steps with composer & TYPO3. How can I update my TYPO3-Package from 9.5.5to 9.5.8?
I also try to remove mso/idna-convert with
composer remove mso/idna-convert
mso/idna-convert is not required in your composer.json and has not been removed
Here's my composer.json:
{
"repositories": [
{
"type": "path",
"url": "packages/*"
},
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
"name": "typo3/cms-base-distribution",
"description" : "TYPO3 CMS Base Distribution",
"license": "GPL-2.0-or-later",
"config": {
"platform": {
"php": "7.2"
}
},
"require": {
"typo3/minimal": "^9.5",
"typo3/cms-about": "^9.5",
"typo3/cms-adminpanel": "^9.5",
"typo3/cms-belog": "^9.5",
"typo3/cms-beuser": "^9.5",
"typo3/cms-felogin": "^9.5",
"typo3/cms-fluid-styled-content": "^9.5",
"typo3/cms-form": "^9.5",
"typo3/cms-impexp": "^9.5",
"typo3/cms-info": "^9.5",
"typo3/cms-redirects": "^9.5",
"typo3/cms-reports": "^9.5",
"typo3/cms-rte-ckeditor": "^9.5",
"typo3/cms-setup": "^9.5",
"typo3/cms-seo": "^9.5",
"typo3/cms-sys-note": "^9.5",
"typo3/cms-t3editor": "^9.5",
"typo3/cms-tstemplate": "^9.5",
"typo3/cms-viewpage": "^9.5",
"typo3/cms-filemetadata": "^9.5",
"gridelementsteam/gridelements": "^9.0",
"mask/mask": "^4.1.0",
"georgringer/news": "^7.0",
"ichhabrecht/content-defender": "^3.0",
"fluidtypo3/vhs": "^5.1",
"schmitzal/tinyimg": "^1.3",
"friendsoftypo3/tt-address": "^4.2",
"in2code/femanager": "^5.0",
"typo3/cms-recycler": "^9.5",
"algo26-matthias/idna-convert": "^3.0"
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "public"
}
}
}
What is it all about this mso/idnaconvert - stuff? How can I fix my composer -installation?
Thanks for your help.

I don't know if this subject is still relevant.
But if you use ddev, you can run composer update typo3/cms-* --with-all-dependencies via SSH in the container.
This should work.

Related

I have plugin built in craft cms3, I want to use same plugin in craft cms4

I have simply copy and paste plugin( plugin name is websitetoolbox) folder to craft cms4's vendor folder. And modify root composer.json like below.
{
"require": {
"craftcms/cms": "^4.2.0.2",
"swishdigital/template-selector": "^1.0",
"vlucas/phpdotenv": "^5.4.0",
"websitetoolbox/websitetoolboxforum": "1.4.0"
},
"require-dev": {
"yiisoft/yii2-shell": "^2.0.3"
},
"autoload": {
"psr-4": {
"modules\\": "modules/"
}
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
"yiisoft/yii2-composer": true
},
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "8.0.2"
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
When I run command composer update it gives below error
Problem 1
- Root composer.json requires websitetoolbox/websitetoolboxforum 1.4.0, found websitetoolbox/websitetoolboxforum[dev-master, 1.0.0, 1.3.0] but it does not match the constraint.
The line:
"websitetoolbox/websitetoolboxforum": "1.4.0"
Should probably be:
"websitetoolbox/websitetoolboxforum": "1.3.0"
I'm no expert on semantic versioning, but it seems a bit odd that you have a higher version number? Could it be a typo on your end? Cause if another dependency requires this version you might be in trouble.

Babel : As of v7.0.0-beta.55, we've removed Babel's Stage presets

I'm trying to create a build for this project but I've faced this issue with babel :
Error: [BABEL] D:\open-source\React\react-notify\src\components\Notification\Action\index.js:
As of v7.0.0-beta.55, we've removed Babel's Stage presets.
Please consider reading our blog post on this decision at
https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets
for more details. TL;DR is that it's more beneficial in the
long run to explicitly add which proposals to use.
For a more automatic migration, we have updated babel-upgrade,
https://github.com/babel/babel-upgrade to do this for you with
"npx babel-upgrade".
If you want the same configuration as before:
{
"plugins": [
// Stage 2
["#babel/plugin-proposal-decorators", { "legacy": true }],
"#babel/plugin-proposal-function-sent",
"#babel/plugin-proposal-export-namespace-from",
"#babel/plugin-proposal-numeric-separator",
"#babel/plugin-proposal-throw-expressions",
// Stage 3
"#babel/plugin-syntax-dynamic-import",
"#babel/plugin-syntax-import-meta",
["#babel/plugin-proposal-class-properties", { "loose": false }],
"#babel/plugin-proposal-json-strings"
]
}
If you're using the same configuration across many separate projects,
keep in mind that you can also create your own custom presets with
whichever plugins and presets you're looking to use.
module.exports = function() {
return {
plugins: [
require("#babel/plugin-syntax-dynamic-import"),
[require("#babel/plugin-proposal-decorators"), { "legacy": true }],
[require("#babel/plugin-proposal-class-properties"), { "loose": false }],
],
presets: [
// ...
],
};
};
my package.json:
{
"name": "react-notify",
"version": "0.1.0",
"description": "Push notification component for React",
"main": "dist/index.js",
"module": "dist/index.js",
"babel": {
"presets": [
"#babel/react",
"#babel/env",
"#babel/stage-2"
]
},
"license": "MIT",
"dependencies": {
"#babel/runtime": "^7.11.2",
"#fortawesome/fontawesome-svg-core": "^1.2.30",
"#fortawesome/free-brands-svg-icons": "^5.14.0",
"#fortawesome/free-solid-svg-icons": "^5.14.0",
"#fortawesome/react-fontawesome": "^0.1.11",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"styled-components": "^5.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "SET NODE_ENV=production && rm -rf dist && mkdir dist && npx babel src/components/Notification --out-dir dist --copy-files",
"test": "react-scripts test",
"eject": "react-scripts eject",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"resolutions": {
"styled-components": "^5"
},
"devDependencies": {
"#babel/cli": "^7.11.6",
"#babel/core": "^7.11.6",
"#babel/preset-env": "^7.11.5",
"#babel/preset-react": "^7.10.4",
"#babel/preset-stage-2": "^7.8.3",
"#storybook/addon-actions": "^6.0.21",
"#storybook/addon-essentials": "^6.0.21",
"#storybook/addon-links": "^6.0.21",
"#storybook/node-logger": "^6.0.21",
"#storybook/preset-create-react-app": "^3.1.4",
"#storybook/react": "^6.0.21",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"react-addons-test-utils": "^15.6.2",
"react-is": "^16.13.1",
"react-test-renderer": "^16.13.1"
}
}
I tried :
npx babel-upgrade
But still facing the same issue.
My Action/index.js:
import React, { useContext } from "react"
import PropTypes from "prop-types"
import { Button, Wrapper } from "./Styled"
import Context from "../context"
const Action = ({ name, onClick }) => {
const { type } = useContext(Context);
if (!(typeof onClick === "function")) {
throw new Error("Action event should be a function")
}
return (< Wrapper >
<Button type={type} onClick={onClick}>{name}</Button>
</Wrapper >)
}
Action.propTypes = {
name: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired
}
export default Action
Why I faced this issue?
Babel had stopped supporting Stage Presets in the configuration. Read this article.
How to solve the issue?
By running this command :
npx babel-upgrade
Then:
npm install
This will replace the legacy dependencies with :
"devDependencies": {
"#babel/cli": "^7.11.6",
"#babel/core": "^7.11.6",
"#babel/plugin-proposal-class-properties": "^7.0.0",
"#babel/plugin-proposal-decorators": "^7.0.0",
"#babel/plugin-proposal-export-namespace-from": "^7.0.0",
"#babel/plugin-proposal-function-sent": "^7.0.0",
"#babel/plugin-proposal-json-strings": "^7.0.0",
"#babel/plugin-proposal-numeric-separator": "^7.0.0",
"#babel/plugin-proposal-throw-expressions": "^7.0.0",
"#babel/plugin-syntax-dynamic-import": "^7.0.0",
"#babel/plugin-syntax-import-meta": "^7.0.0",
}
And replace the configuration with :
"babel": {
"presets": [
"#babel/react",
"#babel/env"
]
},

Using protractor with directconnect=true - how to fix - This version of ChromeDriver only supports Chrome version

package.json
{
"name": "test1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "npm run webdriver-update && npm run test-protractor",
"test-protractor": "protractor protractor.conf.js",
"webdriver-update": "webdriver-manager update"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"cucumber": "^6.0.5",
"jasmine-spec-reporter": "^4.2.1",
"protractor": "^5.4.2",
"protractor-cucumber-framework": "^6.2.0",
"rimraf": "^3.0.1"
}
}
protractor.conf.js
const protractor = require('protractor');
// console.log('browser = ', browser);
exports.config = {
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
getPageTimeout: 60000,
allScriptsTimeout: 500000,
specs: ['features/*.feature'],
baseURL: 'http://www.google.com/',
cucumberOpts: {
require: [
'./features/step_definitions/stepDefinitions.js'
],
tags: false,
profile: false,
'no-source': true
},
onPrepare: function() {
// browser.ignoreSynchronization = true;
// browser.manage().window().maximize();
// browser.manage().timeouts().implicitlyWait(5000);
},
capabilities: {
browserName: "chrome",
chromeOptions: {
args: [
'--headless',
'--disaple-gpu',
'--window-size=1920,1080',
'--no-sandbox',
'--disable-dev-shm-usage'
],
prefs: {
download: {
prompt_for_download: false,
extensions_to_open: ''
},
profile: {
default_content_settings: {
popups: 0
}
},
directory_upgrade: true
},
useAutomationExtension: false
}
},
// connec direct to webdriver, instead of local selenium server!
directConnect: true,
ignoreUncaughtException: true,
onComplete: () => {
// Reporter.createHtmlReport();
}
}
Error
Session not created: This version of ChromeDriver only supports Chrome version 80
I can manually set update-config.json andhave downloaded many different chromedriver versions, but I still get the same error.
Example:
update-config.json
{"standalone":{"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar","all":["node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar"]},"gecko":{"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0.exe","all":["node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0.exe"]},"chrome":{"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_75.0.3770.8.exe","all":["node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_75.0.3770.8.exe","node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_75.0.3770.8.exe"]}}
Error
E/launcher - session not created: This version of ChromeDriver only supports Chrome version 75
This is version 75, so what is happening exactly?
I am not using angular. I am using directconnect=true, and set everything to be headless. I did have it working at one point but lost the code and stuck in this loop.
ok, so I have followed the advice from this thread:
- protractor 2.5.4 E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79
I am now using chromedriver version: 78.0.3904.105.
node node_modules/protractor/bin/webdriver-manager clean
node node_modules/protractor/bin/webdriver-manager update
node node_modules/protractor/bin/webdriver-manager --versions.chrome=78.0.3904.105
Ensure this version - chromedriver_78.0.3904.105 - is updated in all references in update-config.json file.
update-config.json
{
"standalone":{
"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar",
"all":[
"node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar"
]
},
"gecko":{
"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0.exe",
"all":[
"node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.26.0.exe"
]
},
"chrome":{
"last":"node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_78.0.3904.105.exe",
"all":[
"node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_78.0.3904.105.exe",
"node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_78.0.3904.105.exe"
]
}
}
run protractor with option: --no-webdriver-update
"scripts": {
"test": "npm run test-protractor --no-webdriver-update"
},
Now it works!

Ava additional babel plugins are not being run

I'm trying to use an additional babel plugin when running Ava to transpile react dynamic imports so they can run on node (based on this response)
ava dynamic syntax import enable support
I cannot add it to my main .babelrc file as we are implementing bundle splitting in webpack.
To get around this I'm trying to include the plugin through ava's babel configuration. When I run ava, babel does not use the additional plugin.
package.json
{
"dependencies": {
"babel-cli": "6.16.0",
"babel-core": "^6.26.3",
"babel-eslint": "7.2.1",
"babel-loader": "^7.1.2",
"babel-plugin-dynamic-import-node": "^2.1.0",
"babel-plugin-flow-react-proptypes": "^5.1.2",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-recharts": "1.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-async-to-generator": "^6.22.0",
"babel-plugin-transform-builtin-extend": "^1.1.2",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "6.16.0",
"babel-preset-es2015-node": "^6.1.1",
"babel-preset-react": "6.16.0"
},
"devDependencies": {
"ava": "^0.24.0",
"babel-preset-env": "^1.7.0",
"babel-register": "6.16.3"
},
"ava": {
"require": [
"babel-register",
"babel-polyfill",
"ignore-styles"
],
"babel": {
"plugins": [
"babel-plugin-dynamic-import-node"
]
}
}
}
.babelrc
{
"plugins": [
["babel-plugin-transform-builtin-extend", {
"globals": ["Error"]
}],
"recharts",
"transform-object-rest-spread",
"flow-react-proptypes",
"transform-flow-strip-types",
"transform-async-to-generator",
"transform-class-properties",
"syntax-dynamic-import",
"react-hot-loader/babel",
[
"module-resolver",
{
"root": ["./src"],
"alias": {
"tests": "./tests"
}
}
]
],
"presets": ["env", "react"]
}
0.24 is quite old. The latest version for Babel 6 is 0.25, but if possible you should upgrade to Babel 7 and use the latest AVA 1.0 beta.

How can I update Lumen via composer?

I'm developping a web app using Lumen. I followed the instructions from the doc, installing laravel/lumen-installer via Composer, then doing lumen new myApp to get it properly installed (it was in April 2015).
While working on queues, the method "onQueue" was (and still is) not found... I presume I have an old version of the package "Illuminate/queue" (or what else?). Checking on packagist, Lumen is now in v5.1.5 (https://packagist.org/packages/laravel/lumen-framework) and the one I'm using is v5.0.4. So I did an update with composer :
composer update laravel/lumen-framework
But I get the v5.0.10, not the 5.1.4. Why so?
I checked that issue: https://github.com/dingo/api/issues/447 but in my composer.json, I have:
"config": {
"preferred-install": "dist"
}
So what is the problem? How can I get the last version of Lumen? Moreover, how can I get the onQueue method (updating only the package "Illuminate/queue")?
Thanks in advance
UPDATE, as asked in comments below, this is my initial composer.json (just not to miss anything):
{
"require": {
"laravel/lumen-installer": "~1.0"
}
}
and myApp composer.json:
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"laravel/lumen-framework": "5.0.*",
"vlucas/phpdotenv": "~1.0",
"illuminate/mail": "~5.0",
"imagine/imagine": "^0.6.2",
"league/csv": "^7.1",
"gregwar/captcha": "^1.1",
"neitanod/forceutf8": "^1.4",
"predis/predis": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist"
}
}
You have to update your composer.json
"require": {
"php": ">=5.5.9",
"laravel/lumen-framework": "5.1.*",
"vlucas/phpdotenv": "~1.0"
},