BaseApplicationCustomizer throws errors - spfx

So today I was updating one of our SPFX extensions to use the latest spfx framework (1.16) with node (16.13) and after finishing my updates I got the following inside my code:
I am not exactly sure why these are not coming in, I suspect the newest version of spfx moves these classes out of sp-application-base, but why? and where is the documentation for it? Because there is this link that is only 6 months old and explains to use this code for the top and bottom headers.
I was expecting this code to remain in sp-application-base, but it appears it isn't in that package.

How did you perform the upgrade? I highly recommend using the Microsoft 365 CLI to upgrade projects, as the developers of that app do thier best to cover every part of the project that needs to change. Learn more at https://pnp.github.io/cli-microsoft365/cmd/spfx/project/project-upgrade/
Here are the commands to run from the root of your project
npm install -g #pnp/cli-microsoft365
m365 spfx project upgrade --output text
This will give a list of npm commands and code update instructions to follow. See the above documentation for other options for output and use whatever works best for you.

It is still there. What version of #microsoft/sp-application-base is in your project? Should be 1.16.1 I believe. I will say that I am new to all of this as well, but I am using the latest framework and VS is not flagging any issues with these.

Related

Migrating to NativeScript 7

I'm migrating a typescript/angular based NativeScript project over to the latest version of NativeScript, and am running into an issue. Before, I was using the tns-platform-declarations plugin (https://preview.npmjs.com/package/tns-platform-declarations) so I could get intellisense (I'm using VS Code) for things like UITextView and other native calls. But when updating my project, this module is removed from package.json. And if I add it back in, it says my project is not compatible with 7.x.
Do I just need to wait until the plugin is updated, or is there another way to get intellisense going, but still use NS 7.x?
Extending on Matthew's answer. Make sure you are including in your tsconfig the references.d.ts file, the one that points to either tns-platform-declarations or #nativescript/types, depending on your NativeScript version.
When you migrate the project it will change your tns-platform-declaration to #nativescript/types
https://nativescript.org/blog/nativescript-7-announcement/

How to update Laravel Application (not the composer dependencies)

I have an question regarding updates to the framework of a Laravel application.
Normally I run the composer update command to update all of its dependencies. For the laravel framework the package laravel/framework is used.
But they made some changes in this package which require you to make changes in the core application (not in composer). The core application is the package laravel/laravel.
For example, in this commit they have made a function called confirmPassword() which refers to a file ConfirmPasswordController.php in the package laravel/laravel.
But this file didn't exists on my application because my application is not up-to-date.
My question
How do i keep my core application up to date?
Errors
See a typical example of updating the dependencies but not the application here.
First of all... This is not an easy question and IMO there are MANY possible scenarios... Depending on the code you developed, the packages you're using, the version you want to use, and so on...
Anyway This is what I would do in this situation:
Let's say for example I want to upgrade from version X to version Z where Z is two major / minor releases ahead of X
Step 1
Follow the next steps for one major / minor realease at time. Once I've tried to upgrade an application from Laravel 5.4 to 5.6 and it was completely broken. So I decided to upgrade to 5.5 and test the everything was working and, in case, block at that release. Luckily when I've upgraded from 5.5 to 5.6 (after code fix) I've managed to make everything work as it should.
Step 2
Upgrade the core framework and the plugins, check for errors during the upgrade and ofc, check the official documentation for any kind of compatibility problem
Step 3
Laravel has it's own upgrade guide that should be followed step by step. A good chunk of errors can be solved simply following that guide. There may be some plugins that doesn't provide it but usually the problems are releated to new features... It's hard that a method, class or trait has completely changed from one version to another.
Step 4
This step can be omitted, but from the example you've provided maybe it's better to add it. When there is a new feature that requires a specific class or trait or whatsoever, the simplest way to check if the error is thrown because of a file missing (and that is part of the "boilerplate") or has a different nature, is to create an empty project with that specific version and make a comparison with the "default" files.
For example, if you made no changes to the LoginController, checking if the new version has any kind of updates, may be the solution.
You can do this manually, following the upgrade guide for the version you're upgrading from/to, for example this one.
Alternatively, Laravel Shift is a paid but fairly inexpensive tool that will do it for you automatically. Since it's making changes to your project, you should carefully review everything it's done.

How to migrate/update to newer version of Xamarin.Forms?

I have some xamarin.forms 1.xx( I dont know which version) project on multiple platforms Android and iOS. And I've been asked to upgrade it to the maximum available right now version of xamarin.forms.
Therefore, I have 2 questions:
1) How to determine which version of forms I'm using right now (I'm working in Windows environment using Visual Studio 2015 ).
2) How to migrate/update to newest version of forms? (step by step, if it's possible). I have no idea how the result of that kind of operation supposed to look like, cuz I have never done anything like this before in my life. And what the best practices are?
What I've done is opened VS2015->Help->Xamarin release notes, however there was nothing about version of Forms I'm using. Also, I went to the official xamarin website and there was no guide how to do that. I also tried to look at the release notes the last Forms update and trying to find and fix differences, but my project is so big and I thought that this way doesn't seems right.
I'll answer first the What are the best practice regarding upgrading a Xamarin.Forms application? first and then address your other concerns.
I recently upgraded from 1.5.1 to 2.3.2, and from my experience, this is the steps to go through:
Decide which version you will upgrade from and to.
Read the change logs for all stabled releases between these two versions and look for breaking changes/bugfixes. You can find the release notes on Xamarin's website or on NuGet's website too.
Check regularly for new releases on the Xamarin.Forms forum and check if any reported issues may affect you. Every time Xamarin makes a release, there is a thread full of comments from other developers that may have encountered issues you might be interested in.
Using your favorite versioning software, make sure that all local changes are commited or stashed and create a new branch for your Xamarin.Forms upgrade (you don't know how long the upgrade will take and you still want to be able to send patches during the process)
Upgrade: Read the Important notes at Xamarin.Forms 2.3.2 release notes, especially the When upgrading Xamarin.Forms take care not to simply "update all" as ... part. Remember to upgrade on your PCL project, on your iOS project and on your Android project.
Test your whole app on as many devices as possible and for the longest possible period before you merge your branch back into your development/master/Main branch and address the potential incompatibility issues that may have been created in your development/master/Main simultaneously.
Step 3 is very important as it will allow you to reset back to your starting point and restart if you should fail to upgrade for whatever reason.
Xamarin.Forms is moving fast so it's important that you always keep an eye on what's going on even if you don't upgrade.
Which version am I using right now?
You can check that in the NuGet package interface or in the packages.json file in your project.

What is the right approach to include Xlab packages for development?

I am new to xamarin and using XLab packages. I can see that Xlab packages are not stable yet however community is strongly supporting. In test
project I have added packages using Nugets. Now I found one issue in camera API of it so, how should I fix it. I have just
library files so, I can see code or fix it immediately.
Should I include the code of it? Because I can't wait for community to fix the issue and get the updated package of it? Yes If I will fix something then
I would love to contribute to open source community.
FYI: I am using PCL approach for development.
Best option would be to fork the GitHub repository and work on the sample application.
You can also get a copy of the source without cloning but then you cannot create a pull request for any code fixes. You can still report any bugs you find but it will be easier to contribute to the project by forking the project.

Installing yii2 framework using Xampp - do i need a github account?

A couple of years of go i used to program using PHP, but without frameworks. With these recent developments I've decided to get in the to the game and try using one. I've decided to use yii 2.0 .
I've read some of the documentation and in my opinion there is some lack of information (at least for who is getting started), so i´m having some problems installing yii 2.0 on my computer using Xampp. The PHP version is 5.5.9.
From what i could understand i downloaded the yii 2.0 framework, extracted the content and copied to c:\xampp\htdocs\yii2
I've already installed the composer, so the the next thing to do i think would be, using the cmd, do these two lines of code:
composer global require "fxp/composer-asset-plugin:1.0.0"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
The problem is when i do the last one it asks for username and password i think of GitHub. Can you tell me if I'm obligated to have an account on github to install yii 2.0 framework.
Is there a way to get around this?
Yii2 is integrated with composer asset plugin. It allows download Bower and NodeJs packages through Composer.
Github account is required to overcome API rate limit. Here is the explanation from the main contributor of this extension:
It's a rate limit of Github API. In anonymous access, Github at a
greatly reduced limit (60/hr it seems to me), and we must be logged
with a token for have a much higher limit.
See composer/composer#1569 and composer/composer#1877
The problem also exists using Nodejs and Bower.
You can find it in this issue, it's 9th from the top.
I think workaround with installing Bower and the same packages is not an option, because initially and with each framework update you must manually synchronize packages with their versions and override some configuration. Also some extensions require javascript plugins and using composer asset plugin too. So you have to do the same with each of them too. It simply not worth it. And having account on Github for web developer nowadays is kind of de facto standard.
Just create Github account if you are still don't have one and everything should be fine. Earlier updating process was pretty slow, now it's faster and I found this approach pretty interesting and flexible.

Resources