- The
browser
field is now used for web related build, alongside themain
field which is now only used for node build.
- Sifodyas is now open source on Github 🎉
- The repository is now a monorepo and the main source code is now located under the
core/
folder. - Plugins and additional bundles are now under
lib/plugins/
andlib/bunldes/
folders.
- The repository is now a monorepo and the main source code is now located under the
- The
YamlLoader
is now in a separated plugin,@sifodyas/yaml-loader
.
- "Parents & dependencies" features will not be added. You can safely remove related methods.
boot
andshutdown
methods no longer return something. (they returnPromise<void>
now)getParameter
is not async anymore- Loaders returned by
getContainerLoader
are now onlyJsonLoader
by default. Also, the protected memberloaders
should now be used in order to change default loaders.
- The env prefix
yaml:
is now handled by a separated plugin,@sifodyas/yaml-env-parser
KernelParametersKeyType
is nowParametersKeyType
ServicesKeyType
now maps the type of requested services
EventPublisher
andEventSubscriber
are now available as services as long askernel.events
parameter is true.EventKeyType
maps the type of listened events
- Is pure functions, you should now use the plugin
@sifodyas/fp-di
to access the container.
- Trait are now handled by an external dependency:
@bios21/tstrait
- Sifodyas now supports env var in config files: (basic usage in yaml)
key: %env(MY_ENV_VAR)%
.- Front: env var are fetched in window object with the
ENV_
prefix:window.ENV_MY_ENV_VAR
. - Node: env var are fetched in
process.env
. - Env var can be deep resolved (if an env var contains another
env()
function as a value) and so on.
- Front: env var are fetched in window object with the
- If you had it, you don't need to setup an alias for
yamljs
in webpack config anymore. - Loader are now imported directly from Sifodyas itslef
// 1.7 import { Loader } from '@sifodyas/sifodyas'; const JsonLoader = Loader.JsonLoader; // 2.0 import { JsonLoader } from '@sifodyas/sifodyas';
- Sifodyas is now node compatible, you should then maybe disable node related code access during front developpement
// in webpack config node: { fs: 'empty', process: false, },
- Your
dependencyInjection/Configuration.ts
must now implementsvalidateConfig(obj)
method. This method passes through the config object of your bundle and returns it, validated and formated. If you don't need validation or format, just return theobj
straight as it is. ParameterBag
&FrozenParameterBag
now holdsunknown
values instead of a generic type.IParameterBag
following methods are now async:get
,resolve
,resolveValue
ParameterBag.resolveString
method is now async
- Is no longer a "standalone" class. It now implements an
IContainer
interface which itself implements a PSR like interface. - Is also now restable with the
reset
method. getParameter
method is now async and will now have the good return type for kernel parameters keysget
(service) method will now have the good return type forkernel
andservice_container
keysisFrozen
method no longer exists. UseisCompiled
instead.- Compile phase is now handled separately in a
Compiler
class. This compiler will holdCompilerPass
s which are used as hooks during various steps of the compilation process.
- The versions are now showing the dev suffix when a dev version is used.
- Bundle cannot have or be "parent" anymore.
getBundle()
will always return one bundle. bundleMap
property no longer exists, usebundles
instead.getOverriddenParameters
method is now async.getEnvParameters
method no longer exists.