Compare commits

..

No commits in common. "main" and "correctif" have entirely different histories.

17 changed files with 133 additions and 365 deletions

View file

@ -31,38 +31,18 @@
--fw-medium: 500; --fw-medium: 500;
--fw-bold: 600; --fw-bold: 600;
// --color-bg: #161616; --color-bg: #161616;
// --color-txt: #ffffff; --color-txt: #ffffff;
// --color-txt-light: #b9b9b9; --color-txt-light: #b9b9b9;
// --color-accent: #00ff00;
// --color-accent-50: #e9ffe9;
// --color-accent-100: #d8fdd8;
// --grey-100: #d8d8d8;
// --grey-300: #b9b9b9;
// --grey-400: #969696;
// --grey-600: #6d6d6d;
// --grey-800: #383838;
--grey-100: #2f2f2f;
--grey-200: #2f2f2f;
--grey-300: #4a4a4a;
--grey-400: #6a6a6a;
--grey-600: #9a9a9a;
--grey-800: #cfcfcf;
--grey-950: #eaeaea;
--color-bg: #ffffff;
--color-txt: #161616;
--color-txt-light: var(--grey-400);
--color-accent: #00ff00; --color-accent: #00ff00;
--color-accent-50: #e9ffe9; --color-accent-50: #e9ffe9;
--color-accent-100: #d8fdd8; --color-accent-100: #d8fdd8;
--grey-100: #d8d8d8;
--grey-300: #b9b9b9;
--grey-400: #969696;
--grey-600: #6d6d6d;
--grey-800: #383838;
--border: 1px solid var(--color-txt); --border: 1px solid var(--color-txt);
--border-light: 1px solid var(--grey-800); --border-light: 1px solid var(--grey-800);

View file

@ -1,6 +1,5 @@
#site-footer { #site-footer {
background-color: var(--color-txt); background-color: black;
color: var(--color-bg);
width: 100vw; width: 100vw;
position: relative; position: relative;
left: calc(var(--padding-body)*-1); left: calc(var(--padding-body)*-1);

View file

@ -1,7 +1,7 @@
@charset "UTF-8"; @charset "UTF-8";
:root { :root {
--font: 'Executive', Arial, sans-serif; --font: "Executive", Arial, sans-serif;
--title: 'System', Arial, sans-serif; --title: "System", Arial, sans-serif;
--fs-x-small: 10px; --fs-x-small: 10px;
--fs-small: 12px; --fs-small: 12px;
--fs-normal: 16px; --fs-normal: 16px;
@ -9,32 +9,22 @@
--fs-big: 30px; --fs-big: 30px;
--fs-x-big: 38px; --fs-x-big: 38px;
--fs-button-bold: 22px; --fs-button-bold: 22px;
}
@media screen and (max-width: 720px) {
:root {
--fs-medium: 20px;
--fs-big: 26px;
}
}
:root {
--leading-tight: 1; --leading-tight: 1;
--leading-normal: 1.2; --leading-normal: 1.2;
--fw-normal: 400; --fw-normal: 400;
--fw-medium: 500; --fw-medium: 500;
--fw-bold: 600; --fw-bold: 600;
--grey-100: #2f2f2f; --color-bg: #161616;
--grey-200: #2f2f2f; --color-txt: #ffffff;
--grey-300: #4a4a4a; --color-txt-light: #b9b9b9;
--grey-400: #6a6a6a;
--grey-600: #9a9a9a;
--grey-800: #cfcfcf;
--grey-950: #eaeaea;
--color-bg: #ffffff;
--color-txt: #161616;
--color-txt-light: var(--grey-400);
--color-accent: #00ff00; --color-accent: #00ff00;
--color-accent-50: #e9ffe9; --color-accent-50: #e9ffe9;
--color-accent-100: #d8fdd8; --color-accent-100: #d8fdd8;
--grey-100: #d8d8d8;
--grey-300: #b9b9b9;
--grey-400: #969696;
--grey-600: #6d6d6d;
--grey-800: #383838;
--border: 1px solid var(--color-txt); --border: 1px solid var(--color-txt);
--border-light: 1px solid var(--grey-800); --border-light: 1px solid var(--grey-800);
--header-h: 80px; --header-h: 80px;
@ -45,6 +35,12 @@
--h-block: 30px; --h-block: 30px;
--curve: cubic-bezier(0.175, 0.885, 0.32, 1.275); --curve: cubic-bezier(0.175, 0.885, 0.32, 1.275);
} }
@media screen and (max-width: 720px) {
:root {
--fs-medium: 20px;
--fs-big: 26px;
}
}
* { * {
margin: 0; margin: 0;
@ -507,17 +503,15 @@ main {
z-index: 900; z-index: 900;
width: calc(100vw - var(--padding-body) * 2); width: calc(100vw - var(--padding-body) * 2);
height: var(--header-h); height: var(--header-h);
}
#site-header.is-shrinked {
height: var(--header-h-shrinked);
border-bottom: var(--border-light);
}
#site-header {
background-color: var(--color-bg); background-color: var(--color-bg);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
#site-header.is-shrinked {
height: var(--header-h-shrinked);
border-bottom: var(--border-light);
}
#site-header .site-title { #site-header .site-title {
display: flex; display: flex;
width: 120px; width: 120px;
@ -596,8 +590,7 @@ main {
} }
#site-footer { #site-footer {
background-color: var(--color-txt); background-color: black;
color: var(--color-bg);
width: 100vw; width: 100vw;
position: relative; position: relative;
left: calc(var(--padding-body) * -1); left: calc(var(--padding-body) * -1);
@ -767,6 +760,7 @@ main {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
grid-gap: calc(var(--padding-body) * 0.75); grid-gap: calc(var(--padding-body) * 0.75);
display: none;
} }
@media screen and (min-width: 1080px) { @media screen and (min-width: 1080px) {
#section__donation .btn--donation__container { #section__donation .btn--donation__container {
@ -782,9 +776,6 @@ main {
#section__donation .btn--donation__container .btn--donation__grow-2 { #section__donation .btn--donation__container .btn--donation__grow-2 {
grid-column: span 2; grid-column: span 2;
} }
#section__donation .btn--donation__container {
display: none;
}
#section__donation .btn--donation__container.is-selected { #section__donation .btn--donation__container.is-selected {
display: grid; display: grid;
} }
@ -1063,10 +1054,6 @@ body.is-fullscreen {
margin-right: auto; margin-right: auto;
} }
.product-content {
display: contents;
}
.store__nav { .store__nav {
padding-top: calc(var(--spacing) * 1); padding-top: calc(var(--spacing) * 1);
padding-bottom: calc(var(--spacing) * 0.5); padding-bottom: calc(var(--spacing) * 0.5);

File diff suppressed because one or more lines are too long

View file

@ -5,10 +5,6 @@
margin-right: auto; margin-right: auto;
} }
.product-content {
display: contents;
}
.store__nav { .store__nav {
padding-top: calc(var(--spacing) * 1); padding-top: calc(var(--spacing) * 1);
padding-bottom: calc(var(--spacing) * 0.5); padding-bottom: calc(var(--spacing) * 0.5);

View file

@ -32,9 +32,6 @@
// Initialize event listeners // Initialize event listeners
setupEventListeners(); setupEventListeners();
// Load initial cart state
loadCart();
} }
function setupEventListeners() { function setupEventListeners() {
@ -63,18 +60,6 @@
}); });
} }
async function loadCart() {
if (!cartInstance) return;
try {
const cart = await cartInstance.getCart();
currentCart = cart;
renderCart();
} catch (error) {
console.error('Error loading cart:', error);
}
}
function openDrawer() { function openDrawer() {
drawer.classList.add('is-open'); drawer.classList.add('is-open');
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';

View file

@ -3,8 +3,8 @@
if (!container) return; if (!container) return;
const handle = container.dataset.shopifyHandle; const handle = container.dataset.shopifyHandle;
const language = container.dataset.language || "fr"; const language = container.dataset.language || 'fr';
const isEnglish = language === "en"; const isEnglish = language === 'en';
const loadingState = container.querySelector(".product-loading"); const loadingState = container.querySelector(".product-loading");
const contentState = container.querySelector(".product-content"); const contentState = container.querySelector(".product-content");
const errorState = container.querySelector(".product-error"); const errorState = container.querySelector(".product-error");
@ -63,10 +63,9 @@
function renderTitle(product, isEnglish) { function renderTitle(product, isEnglish) {
const titleEl = document.querySelector("[data-product-title]"); const titleEl = document.querySelector("[data-product-title]");
if (titleEl) { if (titleEl) {
const title = const title = isEnglish && product.titleEn?.value
isEnglish && product.titleEn?.value ? product.titleEn.value
? product.titleEn.value : product.title;
: product.title;
titleEl.textContent = title; titleEl.textContent = title;
} }
} }
@ -82,10 +81,9 @@
function renderDetails(product, isEnglish) { function renderDetails(product, isEnglish) {
const detailsEl = document.querySelector("[data-product-details]"); const detailsEl = document.querySelector("[data-product-details]");
if (detailsEl) { if (detailsEl) {
const description = const description = isEnglish && product.descriptionEn?.value
isEnglish && product.descriptionEn?.value ? product.descriptionEn.value
? product.descriptionEn.value.replaceAll("\n", "<br>") : product.descriptionHtml || "";
: product.descriptionHtml || "";
detailsEl.innerHTML = description; detailsEl.innerHTML = description;
} }
} }
@ -94,10 +92,9 @@
const imagesContainer = document.querySelector("[data-product-images]"); const imagesContainer = document.querySelector("[data-product-images]");
if (imagesContainer && product.images.edges.length > 0) { if (imagesContainer && product.images.edges.length > 0) {
const productTitle = const productTitle = isEnglish && product.titleEn?.value
isEnglish && product.titleEn?.value ? product.titleEn.value
? product.titleEn.value : product.title;
: product.title;
imagesContainer.innerHTML = product.images.edges imagesContainer.innerHTML = product.images.edges
.map((edge) => { .map((edge) => {
@ -120,16 +117,12 @@
if (product.variants.edges.length <= 1) return; if (product.variants.edges.length <= 1) return;
const firstVariant = product.variants.edges[0].node; const firstVariant = product.variants.edges[0].node;
if ( if (!firstVariant.selectedOptions || firstVariant.selectedOptions.length === 0) return;
!firstVariant.selectedOptions ||
firstVariant.selectedOptions.length === 0
)
return;
const mainOption = firstVariant.selectedOptions[0]; const mainOption = firstVariant.selectedOptions[0];
const optionValues = new Set(); const optionValues = new Set();
product.variants.edges.forEach((edge) => { product.variants.edges.forEach(edge => {
const variant = edge.node; const variant = edge.node;
if (variant.selectedOptions && variant.selectedOptions[0]) { if (variant.selectedOptions && variant.selectedOptions[0]) {
optionValues.add(variant.selectedOptions[0].value); optionValues.add(variant.selectedOptions[0].value);
@ -144,62 +137,52 @@
if (!optionsContainer || !optionsList) return; if (!optionsContainer || !optionsList) return;
const optionName = mainOption.name; const optionName = mainOption.name;
const optionSlug = optionName.toLowerCase().replace(/\s+/g, "-"); const optionSlug = optionName.toLowerCase().replace(/\s+/g, '-');
optionsList.innerHTML = Array.from(optionValues) optionsList.innerHTML = Array.from(optionValues).map((value) => {
.map((value) => { const uniqueId = `${optionSlug}-${value.toLowerCase().replace(/\s+/g, '-')}`;
const uniqueId = `${optionSlug}-${value const variant = product.variants.edges.find(e =>
.toLowerCase() e.node.selectedOptions && e.node.selectedOptions[0]?.value === value
.replace(/\s+/g, "-")}`; )?.node;
const variant = product.variants.edges.find( const isAvailable = variant?.availableForSale || false;
(e) =>
e.node.selectedOptions && e.node.selectedOptions[0]?.value === value
)?.node;
const isAvailable = variant?.availableForSale || false;
return ` return `
<li> <li>
<input <input
type="radio" type="radio"
id="${uniqueId}" id="${uniqueId}"
name="${optionSlug}" name="${optionSlug}"
value="${value}" value="${value}"
data-variant-id="${ data-variant-id="${variant ? variant.id.replace('gid://shopify/ProductVariant/', '') : ''}"
variant ${!isAvailable ? 'disabled' : ''}
? variant.id.replace("gid://shopify/ProductVariant/", "")
: ""
}"
${!isAvailable ? "disabled" : ""}
/> />
<label for="${uniqueId}">${value}</label> <label for="${uniqueId}">${value}</label>
</li> </li>
`; `;
}) }).join('');
.join("");
optionsContainer.style.display = "block"; optionsContainer.style.display = 'block';
const radios = optionsList.querySelectorAll('input[type="radio"]'); const radios = optionsList.querySelectorAll('input[type="radio"]');
const addToCartBtn = document.querySelector("[data-shopify-add-to-cart]"); const addToCartBtn = document.querySelector("[data-shopify-add-to-cart]");
const buttonText = addToCartBtn?.querySelector("[data-button-text]"); const buttonText = addToCartBtn?.querySelector('[data-button-text]');
radios.forEach((radio) => { radios.forEach(radio => {
radio.addEventListener("change", function () { radio.addEventListener('change', function() {
const variantId = this.dataset.variantId; const variantId = this.dataset.variantId;
if (addToCartBtn) { if (addToCartBtn) {
addToCartBtn.dataset.variantId = variantId; addToCartBtn.dataset.variantId = variantId;
addToCartBtn.removeAttribute("disabled"); addToCartBtn.removeAttribute('disabled');
} }
if (buttonText) { if (buttonText) {
buttonText.textContent = buttonText.textContent = addToCartBtn.dataset.defaultText || 'Ajouter au panier';
addToCartBtn.dataset.defaultText || "Ajouter au panier";
} }
const allLi = optionsList.querySelectorAll("li"); const allLi = optionsList.querySelectorAll('li');
allLi.forEach((li) => li.classList.remove("is-selected")); allLi.forEach(li => li.classList.remove('is-selected'));
this.closest("li").classList.add("is-selected"); this.closest('li').classList.add('is-selected');
}); });
}); });
} }
@ -213,11 +196,10 @@
const hasMultipleVariants = product.variants.edges.length > 1; const hasMultipleVariants = product.variants.edges.length > 1;
const firstVariant = product.variants.edges[0]?.node; const firstVariant = product.variants.edges[0]?.node;
const hasOptions = const hasOptions = firstVariant?.selectedOptions && firstVariant.selectedOptions.length > 0;
firstVariant?.selectedOptions && firstVariant.selectedOptions.length > 0;
const uniqueOptions = new Set(); const uniqueOptions = new Set();
product.variants.edges.forEach((edge) => { product.variants.edges.forEach(edge => {
if (edge.node.selectedOptions && edge.node.selectedOptions[0]) { if (edge.node.selectedOptions && edge.node.selectedOptions[0]) {
uniqueOptions.add(edge.node.selectedOptions[0].value); uniqueOptions.add(edge.node.selectedOptions[0].value);
} }
@ -225,11 +207,10 @@
const hasMultipleOptions = uniqueOptions.size > 1; const hasMultipleOptions = uniqueOptions.size > 1;
if (hasMultipleVariants && hasOptions && hasMultipleOptions) { if (hasMultipleVariants && hasOptions && hasMultipleOptions) {
addToCartBtn.setAttribute("disabled", "disabled"); addToCartBtn.setAttribute('disabled', 'disabled');
const buttonText = addToCartBtn.querySelector("[data-button-text]"); const buttonText = addToCartBtn.querySelector('[data-button-text]');
if (buttonText) { if (buttonText) {
buttonText.textContent = buttonText.textContent = addToCartBtn.dataset.textChooseOption || 'Choisissez une option';
addToCartBtn.dataset.textChooseOption || "Choisissez une option";
} }
} else { } else {
const firstAvailableVariant = product.variants.edges.find( const firstAvailableVariant = product.variants.edges.find(
@ -247,50 +228,44 @@
function updateMetaTags(product, isEnglish) { function updateMetaTags(product, isEnglish) {
// Update title and description // Update title and description
const title = const title = isEnglish && product.titleEn?.value
isEnglish && product.titleEn?.value ? product.titleEn.value
? product.titleEn.value : product.title;
: product.title; const description = isEnglish && product.descriptionEn?.value
const description = ? product.descriptionEn.value
isEnglish && product.descriptionEn?.value : product.description;
? product.descriptionEn.value
: product.description;
// Update Open Graph title // Update Open Graph title
const ogTitle = document.getElementById("og-title"); const ogTitle = document.getElementById('og-title');
if (ogTitle) { if (ogTitle) {
ogTitle.setAttribute("content", title); ogTitle.setAttribute('content', title);
} }
// Update Open Graph description // Update Open Graph description
const ogDescription = document.getElementById("og-description"); const ogDescription = document.getElementById('og-description');
if (ogDescription && description) { if (ogDescription && description) {
const excerpt = description.substring(0, 160); const excerpt = description.substring(0, 160);
ogDescription.setAttribute("content", excerpt); ogDescription.setAttribute('content', excerpt);
} }
// Update Open Graph image // Update Open Graph image
const ogImage = document.getElementById("og-image"); const ogImage = document.getElementById('og-image');
if (ogImage && product.images.edges.length > 0) { if (ogImage && product.images.edges.length > 0) {
ogImage.setAttribute("content", product.images.edges[0].node.url); ogImage.setAttribute('content', product.images.edges[0].node.url);
} }
// Update product price // Update product price
const ogPrice = document.getElementById("og-price"); const ogPrice = document.getElementById('og-price');
if (ogPrice) { if (ogPrice) {
const price = parseFloat( const price = parseFloat(product.priceRange.minVariantPrice.amount).toFixed(2);
product.priceRange.minVariantPrice.amount ogPrice.setAttribute('content', price);
).toFixed(2);
ogPrice.setAttribute("content", price);
} }
// Update availability // Update availability
const ogAvailability = document.getElementById("og-availability"); const ogAvailability = document.getElementById('og-availability');
if (ogAvailability) { if (ogAvailability) {
const availability = product.availableForSale const availability = product.availableForSale ? 'in stock' : 'out of stock';
? "in stock" ogAvailability.setAttribute('content', availability);
: "out of stock";
ogAvailability.setAttribute("content", availability);
} }
// Update page title // Update page title
@ -300,7 +275,7 @@
let metaDescription = document.querySelector('meta[name="description"]'); let metaDescription = document.querySelector('meta[name="description"]');
if (metaDescription && description) { if (metaDescription && description) {
const excerpt = description.substring(0, 160); const excerpt = description.substring(0, 160);
metaDescription.setAttribute("content", excerpt); metaDescription.setAttribute('content', excerpt);
} }
} }
})(); })();

View file

@ -306,58 +306,6 @@ class ShopifyCart {
return cart; return cart;
} }
/**
* Get existing cart by ID
*/
async getCart() {
if (!this.cartId) {
return null;
}
const query = `
query getCart($cartId: ID!) {
cart(id: $cartId) {
id
checkoutUrl
lines(first: 10) {
edges {
node {
id
quantity
merchandise {
... on ProductVariant {
id
title
price {
amount
currencyCode
}
product {
title
}
}
}
}
}
}
}
}
`;
try {
const data = await this.query(query, {
cartId: this.cartId
});
return data.cart;
} catch (error) {
// Cart might be expired or invalid
console.error('Error fetching cart:', error);
this.clearCart();
return null;
}
}
/** /**
* Get checkout URL to redirect user * Get checkout URL to redirect user
*/ */

View file

@ -1,5 +0,0 @@
Title: Error
----
Template: default

View file

@ -1,5 +1 @@
Title: Erreur Uuid: kcrqkszqasludg2h
----
Uuid: kcrqkszqasludg2h

View file

@ -25,56 +25,6 @@ return [
); );
} }
], ],
// English homepage
[
'pattern' => 'en',
'action' => function() {
$home = page('home');
if ($home) {
site()->visit($home, 'en');
return $home;
}
return null;
}
],
// English thanks page
[
'pattern' => 'en/thanks',
'action' => function() {
$thanks = page('thanks');
if ($thanks) {
site()->visit($thanks, 'en');
return $thanks;
}
return null;
}
],
// English error page
[
'pattern' => 'en/error',
'action' => function() {
$error = page('error');
if ($error) {
site()->visit($error, 'en');
return $error;
}
return null;
}
],
// French thanks page
[
'pattern' => 'thanks',
'action' => function() {
return page('thanks');
}
],
// French error page
[
'pattern' => 'error',
'action' => function() {
return page('error');
}
],
// French products (default) // French products (default)
[ [
'pattern' => '(:any)', 'pattern' => '(:any)',

View file

@ -38,18 +38,12 @@
const language = container.dataset.language || 'fr'; const language = container.dataset.language || 'fr';
const isEnglish = language === 'en'; const isEnglish = language === 'en';
function initStructuredData() { const cart = new ShopifyCart({
if (typeof ShopifyCart === 'undefined') { domain: 'nv7cqv-bu.myshopify.com',
setTimeout(initStructuredData, 100); storefrontAccessToken: 'dec3d35a2554384d149c72927d1cfd1b'
return; });
}
const cart = new ShopifyCart({ cart.getProductByHandle(handle).then(product => {
domain: 'nv7cqv-bu.myshopify.com',
storefrontAccessToken: 'dec3d35a2554384d149c72927d1cfd1b'
});
cart.getProductByHandle(handle).then(product => {
if (!product) return; if (!product) return;
const title = isEnglish && product.titleEn?.value ? product.titleEn.value : product.title; const title = isEnglish && product.titleEn?.value ? product.titleEn.value : product.title;
@ -85,10 +79,6 @@
if (schemaScript) { if (schemaScript) {
schemaScript.textContent = JSON.stringify(schema, null, 2); schemaScript.textContent = JSON.stringify(schema, null, 2);
} }
}); });
}
// Initialize when ShopifyCart is available
initStructuredData();
})(); })();
</script> </script>

5
vendor/autoload.php vendored
View file

@ -14,7 +14,10 @@ if (PHP_VERSION_ID < 50600) {
echo $err; echo $err;
} }
} }
throw new RuntimeException($err); trigger_error(
$err,
E_USER_ERROR
);
} }
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';

View file

@ -26,23 +26,12 @@ use Composer\Semver\VersionParser;
*/ */
class InstalledVersions class InstalledVersions
{ {
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/** /**
* @var mixed[]|null * @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/ */
private static $installed; private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/** /**
* @var bool|null * @var bool|null
*/ */
@ -320,24 +309,6 @@ class InstalledVersions
{ {
self::$installed = $data; self::$installed = $data;
self::$installedByVendor = array(); self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
} }
/** /**
@ -351,27 +322,19 @@ class InstalledVersions
} }
$installed = array(); $installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) { if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) { if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir]; $installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) { } elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php'; $required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required; $installed[] = self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { self::$installed = $installed[count($installed) - 1];
self::$installed = $required;
self::$installedIsLocalDir = true;
} }
} }
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
} }
} }
@ -387,7 +350,7 @@ class InstalledVersions
} }
} }
if (self::$installed !== array() && !$copiedLocalDir) { if (self::$installed !== array()) {
$installed[] = self::$installed; $installed[] = self::$installed;
} }

View file

@ -17,11 +17,11 @@ class ComposerStaticInit0b7fb803e22a45eb87e24172337208aa
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'W' => 'W' =>
array ( array (
'Whoops\\' => 7, 'Whoops\\' => 7,
), ),
'S' => 'S' =>
array ( array (
'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
@ -29,97 +29,97 @@ class ComposerStaticInit0b7fb803e22a45eb87e24172337208aa
'Symfony\\Polyfill\\Ctype\\' => 23, 'Symfony\\Polyfill\\Ctype\\' => 23,
'Symfony\\Component\\Yaml\\' => 23, 'Symfony\\Component\\Yaml\\' => 23,
), ),
'P' => 'P' =>
array ( array (
'Psr\\Log\\' => 8, 'Psr\\Log\\' => 8,
'PHPMailer\\PHPMailer\\' => 20, 'PHPMailer\\PHPMailer\\' => 20,
), ),
'L' => 'L' =>
array ( array (
'League\\ColorExtractor\\' => 22, 'League\\ColorExtractor\\' => 22,
'Laminas\\Escaper\\' => 16, 'Laminas\\Escaper\\' => 16,
), ),
'K' => 'K' =>
array ( array (
'Kirby\\' => 6, 'Kirby\\' => 6,
), ),
'C' => 'C' =>
array ( array (
'Composer\\Semver\\' => 16, 'Composer\\Semver\\' => 16,
), ),
'B' => 'B' =>
array ( array (
'Base32\\' => 7, 'Base32\\' => 7,
), ),
); );
public static $prefixDirsPsr4 = array ( public static $prefixDirsPsr4 = array (
'Whoops\\' => 'Whoops\\' =>
array ( array (
0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops', 0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops',
), ),
'Symfony\\Polyfill\\Mbstring\\' => 'Symfony\\Polyfill\\Mbstring\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
), ),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
), ),
'Symfony\\Polyfill\\Intl\\Idn\\' => 'Symfony\\Polyfill\\Intl\\Idn\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
), ),
'Symfony\\Polyfill\\Ctype\\' => 'Symfony\\Polyfill\\Ctype\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
), ),
'Symfony\\Component\\Yaml\\' => 'Symfony\\Component\\Yaml\\' =>
array ( array (
0 => __DIR__ . '/..' . '/symfony/yaml', 0 => __DIR__ . '/..' . '/symfony/yaml',
), ),
'Psr\\Log\\' => 'Psr\\Log\\' =>
array ( array (
0 => __DIR__ . '/..' . '/psr/log/src', 0 => __DIR__ . '/..' . '/psr/log/src',
), ),
'PHPMailer\\PHPMailer\\' => 'PHPMailer\\PHPMailer\\' =>
array ( array (
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
), ),
'League\\ColorExtractor\\' => 'League\\ColorExtractor\\' =>
array ( array (
0 => __DIR__ . '/..' . '/league/color-extractor/src', 0 => __DIR__ . '/..' . '/league/color-extractor/src',
), ),
'Laminas\\Escaper\\' => 'Laminas\\Escaper\\' =>
array ( array (
0 => __DIR__ . '/..' . '/laminas/laminas-escaper/src', 0 => __DIR__ . '/..' . '/laminas/laminas-escaper/src',
), ),
'Kirby\\' => 'Kirby\\' =>
array ( array (
0 => __DIR__ . '/../..' . '/kirby/src', 0 => __DIR__ . '/../..' . '/kirby/src',
1 => __DIR__ . '/..' . '/getkirby/composer-installer/src', 1 => __DIR__ . '/..' . '/getkirby/composer-installer/src',
), ),
'Composer\\Semver\\' => 'Composer\\Semver\\' =>
array ( array (
0 => __DIR__ . '/..' . '/composer/semver/src', 0 => __DIR__ . '/..' . '/composer/semver/src',
), ),
'Base32\\' => 'Base32\\' =>
array ( array (
0 => __DIR__ . '/..' . '/christian-riesen/base32/src', 0 => __DIR__ . '/..' . '/christian-riesen/base32/src',
), ),
); );
public static $prefixesPsr0 = array ( public static $prefixesPsr0 = array (
'c' => 'c' =>
array ( array (
'claviska' => 'claviska' =>
array ( array (
0 => __DIR__ . '/..' . '/claviska/simpleimage/src', 0 => __DIR__ . '/..' . '/claviska/simpleimage/src',
), ),
), ),
'M' => 'M' =>
array ( array (
'Michelf' => 'Michelf' =>
array ( array (
0 => __DIR__ . '/..' . '/michelf/php-smartypants', 0 => __DIR__ . '/..' . '/michelf/php-smartypants',
), ),

View file

@ -3,7 +3,7 @@
'name' => 'getkirby/plainkit', 'name' => 'getkirby/plainkit',
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => 'b78a6f822a398b2ea4b53940c7c8bd66e4f3bcc0', 'reference' => '44ed53aae0b7128526b1fe9c2c66e80b18df323f',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -67,7 +67,7 @@
'getkirby/plainkit' => array( 'getkirby/plainkit' => array(
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => 'b78a6f822a398b2ea4b53940c7c8bd66e4f3bcc0', 'reference' => '44ed53aae0b7128526b1fe9c2c66e80b18df323f',
'type' => 'project', 'type' => 'project',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),

View file

@ -19,7 +19,8 @@ if ($issues) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
} }
} }
throw new \RuntimeException( trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues) 'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
); );
} }