File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
src/Fp/Psalm/Util/TypeRefinement Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1+ version : ' 3.6'
2+ services :
3+ php :
4+ container_name : php_functional
5+ build :
6+ context : ./docker/php
7+ dockerfile : Dockerfile
8+ tty : true
9+ volumes :
10+ - ./:/app
Original file line number Diff line number Diff line change 1+ FROM php:8.0-cli
2+
3+ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
4+ RUN chmod +x /usr/local/bin/install-php-extensions
5+
6+ RUN apt-get update -y && apt-get install -y curl unzip
7+
8+ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer --quiet
9+
10+ RUN install-php-extensions xdebug
11+
12+ COPY ./ "$PHP_INI_DIR/conf.d"
13+
14+ ARG HOST_UID=1000
15+ ARG HOST_GID=1000
16+ ARG HOST_USER=docker-user
17+ ARG HOST_GROUP=docker-group
18+
19+ RUN echo '%sudonopswd ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
20+ && groupadd -g $HOST_GID $HOST_GROUP \
21+ && groupadd sudonopswd \
22+ && useradd -m -l -g $HOST_GROUP -u $HOST_UID $HOST_USER \
23+ && usermod -aG sudo $HOST_USER \
24+ && usermod -aG sudonopswd $HOST_USER \
25+ && chown -R $HOST_USER:$HOST_GROUP /opt \
26+ && chmod 755 /opt
27+
28+ USER $HOST_USER
29+
30+ WORKDIR /app
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ private static function fromSeq(Atomic $atomic): Option
8383 ->filter (fn ($ a ) => $ a instanceof TGenericObject)
8484 ->filter (fn ($ a ) => classOf ($ a ->value , Seq::class) || classOf ($ a ->value , NonEmptySeq::class))
8585 ->filter (fn ($ a ) => 1 === count ($ a ->type_params ))
86- ->map (fn ($ a ) => new CollectionTypeParams (Type::getArrayKey (), $ a ->type_params [1 ]));
86+ ->map (fn ($ a ) => new CollectionTypeParams (Type::getArrayKey (), $ a ->type_params [0 ]));
8787 }
8888
8989 /**
@@ -95,7 +95,7 @@ private static function fromSet(Atomic $atomic): Option
9595 ->filter (fn ($ a ) => $ a instanceof TGenericObject)
9696 ->filter (fn ($ a ) => classOf ($ a ->value , Set::class) || classOf ($ a ->value , NonEmptySet::class))
9797 ->filter (fn ($ a ) => 1 === count ($ a ->type_params ))
98- ->map (fn ($ a ) => new CollectionTypeParams (Type::getArrayKey (), $ a ->type_params [1 ]));
98+ ->map (fn ($ a ) => new CollectionTypeParams (Type::getArrayKey (), $ a ->type_params [0 ]));
9999 }
100100
101101 /**
You can’t perform that action at this time.
0 commit comments